using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Inquiry;
|
using CY.Model.Inquiry;
|
using CY.BLL.Sys;
|
using CY.Model;
|
using CY.BLL.EC;
|
using CY.BLL;
|
using CY.WebForm.cs;
|
namespace CY.WebForm.Pages.front
|
{
|
public partial class InquiryOnLine : FrontBasePage
|
{
|
|
#region 变量
|
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
RangeofBusinessBLL _rangeofBusinessBLL = new RangeofBusinessBLL();
|
SysInquiry_PrintingTypeBLL _sysInquiry_PrintingTypeBLL = new SysInquiry_PrintingTypeBLL();
|
EC_AcceptWayBySellerBLL bll_EC_AcceptWayBySellerBLL = new EC_AcceptWayBySellerBLL();
|
public string AcceptTypeId = "105";
|
public string InvoiceId = "108";
|
|
#endregion
|
|
#region 属性
|
|
public string PrintName { get; set; }
|
|
public int PrintTypeId { get; set; }
|
|
#endregion
|
|
#region 方法
|
|
/// <summary>
|
/// 获取登录会员的收货信息
|
/// </summary>
|
public void GetMyAcceptAddress()
|
{
|
try
|
{
|
if (CurrentUser != null && !string.IsNullOrEmpty(CurrentUser.MemberType))
|
{
|
EC_AcceptWayBySeller m_EC_AcceptWayBySeller = bll_EC_AcceptWayBySellerBLL.GetModelByTargetId(CurrentUser.MemberId);
|
AcceptTypeId = m_EC_AcceptWayBySeller.AcceptTypeId.ToString2();
|
//InvoiceId = m_EC_AcceptWayBySeller.InvoiceDemand.ToString2();
|
switch (m_EC_AcceptWayBySeller.InvoiceDemand.ToString2())
|
{
|
case "不含税价":
|
InvoiceId = "108";
|
break;
|
case "普通发票":
|
InvoiceId = "109";
|
break;
|
case "增值税票":
|
InvoiceId = "110";
|
break;
|
default:
|
break;
|
}
|
}
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
return;
|
}
|
}
|
|
public void SetPrintName()
|
{
|
string ss = Request["PrintTypeId"];
|
if (Request["PrintTypeId"] != null)
|
{
|
int printTypeId = Request["PrintTypeId"].ToString().ToInt32().Value;
|
PrintTypeId = printTypeId;
|
SysInquiry_PrintingType model=_sysInquiry_PrintingTypeBLL.GetModelById(printTypeId);
|
PrintName = model.PrintName;
|
this.UIPrintTypeList1.PrintTypeId = printTypeId.ToString();
|
}
|
}
|
|
/// <summary>
|
/// 获取询价参数
|
/// </summary>
|
public static InquiryCommonModel GetInquiryCommonModel()
|
{
|
InquiryCommonModel model = null;
|
try
|
{
|
model = new InquiryCommonModel();
|
var request = HttpContext.Current.Request;
|
int printTypeId = -1;
|
int sizeId = -1;
|
int paperId = -1;
|
string works = string.Empty;
|
int printMode = 1;
|
int gramWeight = -1;
|
int brandId = -1;
|
int printCount = -1;
|
string singleOrdouble = string.Empty;
|
decimal tjWith = 0;
|
decimal tjHigth = 0;
|
decimal tyWith = 0;
|
decimal tyHigth = 0;
|
decimal uvWith = 0;
|
decimal uvHigth = 0;
|
decimal atWith = 0;
|
decimal atHigth = 0;
|
int deliveryMode = -1;
|
int billMode = -1;
|
string remarks = string.Empty;
|
string paperMP = string.Empty;
|
int printBoxNumber = 0;
|
int printCountByBox = 0;
|
int cupType = 0;
|
string printColor = string.Empty;
|
int sjType = 0;
|
string designerDemand = string.Empty;
|
string printSizeName = string.Empty;
|
int coveredTypeId = -1;
|
decimal brushWidth = 0;
|
decimal brushHight = 0;
|
int pageNum = 0;
|
int ropeTypeId = 0;
|
string ropeColor = string.Empty;
|
string envelopType = string.Empty;
|
string pvcType = string.Empty;
|
string pvcThick = string.Empty;
|
int bindingMode = -1;
|
string gildingType = string.Empty;
|
string laFeng = string.Empty;
|
int ysuint = 1;
|
if (request["hidPrintTypeId"] != null)
|
printTypeId = request["hidPrintTypeId"].ToString().ToInt32().Value;
|
if (request["printMode"] != null)
|
printMode = request["printMode"].ToString().ToInt32().Value;
|
if (request["paperSize"] != null)
|
sizeId = request["paperSize"].ToString().ToInt32().Value;
|
if (request["paper0"] != null)
|
{
|
paperId = request["paper0"].ToString().ToInt32().Value;
|
}
|
else
|
{
|
paperId = 3;
|
}
|
if (request["gramWeight0"] != null)
|
gramWeight = request["gramWeight0"].ToString().ToInt32().Value;
|
if (request["brand0"] != null)
|
{
|
brandId = request["brand0"].ToString().ToInt32().Value;
|
}
|
if (request["printCount"] != null)
|
printCount = request["printCount"].ToString().ToInt32().Value;
|
if (request["singleOrdouble0"] != null)
|
singleOrdouble = request["singleOrdouble0"].ToString();
|
if (request["works"] != null)
|
works = request["works"].ToString();
|
if (request["tjWith0"] != null)
|
tjWith = request["tjWith0"].ToString().ToDecimal2().Value;
|
if (request["tjHight0"] != null)
|
tjHigth = request["tjHight0"].ToString().ToDecimal2().Value;
|
if (request["tyWith0"] != null)
|
tyWith = request["tyWith0"].ToString().ToDecimal2().Value;
|
if (request["tyHight0"] != null)
|
tyHigth = request["tyHight0"].ToString().ToDecimal2().Value;
|
if (request["uvWith0"] != null)
|
uvWith = request["uvWith0"].ToString().ToDecimal2().Value;
|
if (request["uvHight0"] != null)
|
uvHigth = request["uvHight0"].ToString().ToDecimal2().Value;
|
if (request["aoTUWith0"] != null)
|
atWith = request["aoTUWith0"].ToString().ToDecimal2().Value;
|
if (request["aoTUHight0"] != null)
|
atHigth = request["aoTUHight0"].ToString().ToDecimal2().Value;
|
if (request["deliveryMode"] != null)
|
deliveryMode = request["deliveryMode"].ToString().ToInt32().Value;
|
if (request["billMode"] != null)
|
billMode = request["billMode"].ToString().ToInt32().Value;
|
if (request["remarks"] != null)
|
remarks = request["remarks"].ToString();
|
if (request["pNameMP"] != null)
|
paperMP = request["pNameMP"].ToString();
|
if (request["printBoxNumber"] != null)
|
printBoxNumber = request["printBoxNumber"].ToString().ToInt32().Value;
|
if (request["printCountByBox"] != null)
|
printCountByBox = request["printCountByBox"].ToString().ToInt32().Value;
|
if (request["cupType"] != null)
|
cupType = request["cupType"].ToString().ToInt32().Value;
|
if (request["printColor0"] != null)
|
printColor = request["printColor0"].ToString();
|
if (request["sjType"] != null)
|
sjType = request["sjType"].ToString().ToInt32().Value;
|
if (request["designerDemand"] != null)
|
designerDemand = request["designerDemand"].ToString();
|
if (request["printSizeName"] != null)
|
printSizeName = request["printSizeName"].ToString();
|
if (request["CoveredType"] != null)
|
coveredTypeId = int.Parse(request["CoveredType"].ToString());
|
if (request["brushWidth"] != null)
|
brushWidth = request["brushWidth"].ToString().ToDecimal2().Value;
|
if (request["brushHight"] != null)
|
brushHight = request["brushHight"].ToString().ToDecimal2().Value;
|
if (request["pageNum"] != null)
|
pageNum = request["pageNum"].ToString().ToInt32().Value;
|
if (request["RopeTypeId"] != null)
|
ropeTypeId = request["RopeTypeId"].ToString().ToInt32().Value;
|
if (request["RopeColor"] != null)
|
ropeColor = request["RopeColor"].ToString();
|
if (request["EnvelopType"] != null)
|
envelopType = request["EnvelopType"].ToString();
|
if (request["pvcType"] != null)
|
pvcType = request["pvcType"].ToString();
|
if (request["pvcThick"] != null)
|
pvcThick = request["pvcThick"].ToString();
|
if (request["bindingMode"] != null)
|
bindingMode = request["bindingMode"].ToString().ToInt32().Value;
|
if (request["gildingType0"] != null)
|
gildingType = request["gildingType0"].ToString();
|
if (request["LaFeng"] != null)
|
laFeng = request["LaFeng"].ToString();
|
|
if (request["ysUnit"] != null)
|
ysuint = request["ysUnit"].ToString().ToInt32().Value;
|
|
model.PrintTypeId = printTypeId;
|
model.PrintMode = printMode;
|
model.PrintSizeId = sizeId;
|
model.PaperId = paperId;
|
model.GramWeight = gramWeight;
|
model.BrandId = brandId;
|
model.PrintCount = printCount;
|
model.Unit = ysuint;
|
model.SingleOrdouble = singleOrdouble;
|
if (!string.IsNullOrEmpty(works))
|
{
|
model.AfterWorkList = new List<int>();
|
string[] workArry = works.Split(',');
|
foreach (string workStr in workArry)
|
{
|
model.AfterWorkList.Add(workStr.ToInt32().Value);
|
}
|
}
|
model.TJWith = tjWith;
|
model.TJHight = tjHigth;
|
model.TYHight = tyHigth;
|
model.TYWith = tyWith;
|
model.UVWith = uvWith;
|
model.UVHight = uvHigth;
|
model.ATWith = atWith;
|
model.ATHight = atHigth;
|
model.DeliveryMode = deliveryMode;
|
model.BillMode = billMode;
|
model.Remarks = remarks;
|
model.PaperMP = paperMP;
|
model.PrintBoxNumber = printBoxNumber;
|
model.CupType = cupType;
|
model.PrintColor = printColor;
|
model.SJType = sjType;
|
model.DesignerDemand = designerDemand;
|
model.PrintSizeName = printSizeName;
|
model.CoveredTypeId = coveredTypeId;
|
model.BrushWidth = brushWidth;
|
model.BrushHight = brushHight;
|
model.PageNum = pageNum;
|
model.RopeTypeId = ropeTypeId;
|
model.RopeColor = ropeColor;
|
model.EnvelopType = envelopType;
|
model.PVCType = pvcType;
|
model.PVCThick = pvcThick;
|
model.BindingMode = bindingMode;
|
model.GildingType = gildingType;
|
model.LaFeng = laFeng;
|
if (model.PrintMode == 1)
|
{
|
model.PrintModeName = "合版印刷";
|
}
|
else
|
{
|
model.PrintModeName = "专版印刷";
|
}
|
string sizeName = string.Empty;
|
PaperSizeDetailBLL _paperSizeDetailBLL = new PaperSizeDetailBLL();
|
|
|
model.PrintTypeName = new SysInquiry_PrintingTypeBLL().GetModelById(model.PrintTypeId).PrintName;
|
string printDemand = string.Empty;
|
//名片
|
if (model.PrintTypeId == 13)
|
{
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
printDemand += paperSize.Name + ",";
|
}
|
model.PrintCount = printCountByBox;
|
|
model.PrintCountName = model.PrintBoxNumber.ToString() + "款,每款" + model.PrintCount.ToString() + "盒";
|
printDemand +=model.PaperMP + "," + model.SingleOrdouble;
|
|
}
|
else if (model.PrintTypeId == 14) //DM单
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand = paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
printDemand += paperInfo.PaperName;
|
if (model.PaperId != 0)
|
{
|
if (model.PrintMode == 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.SingleOrdouble;
|
|
}
|
else if (model.PrintTypeId == 15) //画册
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
if (model.PrintMode == 1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.BindingMode = 14;
|
model.PaperId = 3;
|
model.PageNum = 4;
|
model.PrintColor = "四色印刷";
|
InquiryInsideModel insideModel = new InquiryInsideModel();
|
insideModel.InsideIndex = 1;
|
insideModel.PaperId = 3;
|
insideModel.PrintColor = "四色印刷";
|
if (request["pageNum1"] != null)
|
insideModel.PageNum = request["pageNum1"].ToString().ToInt32().Value;
|
if (request["gramWeight1"] != null)
|
insideModel.GramWeight = request["gramWeight1"].ToString().ToInt32().Value;
|
model.InquiryInsideList.Add(insideModel);
|
printDemand += paperSize.Name + ",骑马订";
|
printDemand += ",封面要求:铜版纸," + model.GramWeight + "克," + model.PrintColor + ",4页";
|
printDemand += ",内页要求:铜版纸," + insideModel.GramWeight + "克," + insideModel.PrintColor + "," + insideModel.PageNum.ToString() + "页";
|
}
|
else
|
{
|
SysInquiry_PaperSizeDetail paperSize = null;
|
if (model.PrintSizeId == -1)
|
{
|
model.IsDefinedSize = 1;
|
if (request["SelSize"] != null)
|
model.PrintSizeId = request["SelSize"].ToString().ToInt32().Value;
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
sizeName = paperSize.Name;
|
int index = sizeName.IndexOf('(');
|
sizeName = sizeName.Substring(0, index);
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
sizeName += "(" + request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString() + ")";
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintSizeName = sizeName;
|
}
|
else
|
{
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
}
|
int insidePageNum = 1;
|
if (request["hidInsidePageNum"] != null)
|
insidePageNum = request["hidInsidePageNum"].ToString().ToInt32().Value;
|
InquiryInsideModel insideModel = null;
|
for (int i = 1; i <= insidePageNum; i++)
|
{
|
works = string.Empty;
|
insideModel = new InquiryInsideModel();
|
insideModel.InsideIndex = i;
|
if (request["paper" + i] != null)
|
{
|
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
|
}
|
if (request["brand" + i] != null)
|
insideModel.BrandId = request["brand" + i].ToString().ToInt32().Value;
|
if (request["gramWeight" + i] != null)
|
insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
|
if (request["printColor" + i] != null)
|
insideModel.PrintColor = request["printColor" + i].ToString();
|
if (request["pageNum" + i] != null)
|
insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
|
if (request["works" + i] != null)
|
works = request["works" + i].ToString();
|
if (!string.IsNullOrEmpty(works))
|
{
|
string[] workArry = works.Split(',');
|
insideModel.AfterWorkList = new List<int>();
|
foreach (string workStr in workArry)
|
{
|
insideModel.AfterWorkList.Add(workStr.ToInt32().Value);
|
}
|
}
|
if (request["tjWith" + i] != null)
|
insideModel.TJWith = request["tjWith" + i].ToString().ToInt32().Value;
|
if (request["tjHight" + i] != null)
|
insideModel.TJHight = request["tjHight" + i].ToString().ToInt32().Value;
|
if (request["tjNum" + i] != null)
|
insideModel.TJNum = request["tjNum" + i].ToString().ToInt32().Value;
|
if (request["uvWith" + i] != null)
|
insideModel.UVWith = request["uvWith" + i].ToString().ToInt32().Value;
|
if (request["uvHight" + i] != null)
|
insideModel.UVHight = request["uvHight" + i].ToString().ToInt32().Value;
|
if (request["uvNum" + i] != null)
|
insideModel.UVNum = request["uvNum" + i].ToString().ToInt32().Value;
|
if (request["lyNum" + i] != null)
|
insideModel.LYNum = request["lyNum" + i].ToString().ToInt32().Value;
|
if (request["gildingType" + i] != null)
|
insideModel.GildingType = request["gildingType" + i].ToString();
|
model.InquiryInsideList.Add(insideModel);
|
}
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
AfterParameterInfoBLL _afterParameterInfoBLL = new AfterParameterInfoBLL();
|
SysInquiry_AfterParameterInfo bindingModeObj = _afterParameterInfoBLL.GetModel(model.BindingMode);
|
printDemand += model.PrintSizeName + "," + bindingModeObj.ParameterName;
|
printDemand += ",封面要求:" + paperInfo.PaperName + "";
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
if (model.PaperId != 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.SingleOrdouble + "," + model.PrintColor + ",4页";
|
printDemand += ";内页要求:";
|
foreach (InquiryInsideModel insideModelObj in model.InquiryInsideList)
|
{
|
printDemand += "内页" + insideModelObj.InsideIndex.ToString() + ":";
|
paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
|
printDemand += paperInfo.PaperName;
|
if (insideModelObj.PaperId != 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(insideModelObj.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + insideModelObj.GramWeight + "克";
|
}
|
printDemand += "," + insideModelObj.PrintColor + "," + insideModelObj.PageNum.ToString();
|
if (paperInfo.PaperName == "硫酸纸")
|
{
|
printDemand += "张";
|
}
|
else
|
{
|
printDemand += "页";
|
}
|
printDemand += ";";
|
}
|
if (!string.IsNullOrEmpty(printDemand))
|
{
|
printDemand = printDemand.Substring(0, printDemand.Length - 1);
|
}
|
bool IsCan = new InquiryBLL().IsCanMerge(model);
|
if (IsCan)
|
{
|
model.InquiryInsideList.SingleOrDefault<InquiryInsideModel>(p => p.InsideIndex == 1 && (p.PageNum += 4) == 1);
|
}
|
}
|
}
|
else if (model.PrintTypeId == 6) //书刊
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperSizeDetail paperSize = null;
|
if (model.PrintSizeId == -1)
|
{
|
model.IsDefinedSize = 1;
|
if (request["SelSize"] != null)
|
model.PrintSizeId = request["SelSize"].ToString().ToInt32().Value;
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
sizeName = paperSize.Name;
|
int index = sizeName.IndexOf('(');
|
sizeName = sizeName.Substring(0, index);
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
sizeName += "(" + request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString() + ")";
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintSizeName = sizeName;
|
}
|
else
|
{
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
}
|
int insidePageNum = 1;
|
if (request["hidInsidePageNum"] != null)
|
insidePageNum = request["hidInsidePageNum"].ToString().ToInt32().Value;
|
InquiryInsideModel insideModel = null;
|
for (int i = 1; i <= insidePageNum; i++)
|
{
|
works = string.Empty;
|
insideModel = new InquiryInsideModel();
|
insideModel.InsideIndex = i;
|
if (request["paper" + i] != null)
|
{
|
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
|
}
|
if (request["brand" + i] != null)
|
insideModel.BrandId = request["brand" + i].ToString().ToInt32().Value;
|
if (request["gramWeight" + i] != null)
|
insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
|
if (request["printColor" + i] != null)
|
insideModel.PrintColor = request["printColor" + i].ToString();
|
if (request["pageNum" + i] != null)
|
insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
|
if (request["works" + i] != null)
|
works = request["works" + i].ToString();
|
if (!string.IsNullOrEmpty(works))
|
{
|
string[] workArry = works.Split(',');
|
insideModel.AfterWorkList = new List<int>();
|
foreach (string workStr in workArry)
|
{
|
insideModel.AfterWorkList.Add(workStr.ToInt32().Value);
|
}
|
}
|
if (request["tjWith" + i] != null)
|
insideModel.TJWith = request["tjWith" + i].ToString().ToInt32().Value;
|
if (request["tjHight" + i] != null)
|
insideModel.TJHight = request["tjHight" + i].ToString().ToInt32().Value;
|
if (request["tjNum" + i] != null)
|
insideModel.TJNum = request["tjNum" + i].ToString().ToInt32().Value;
|
if (request["uvWith" + i] != null)
|
insideModel.UVWith = request["uvWith" + i].ToString().ToInt32().Value;
|
if (request["uvHight" + i] != null)
|
insideModel.UVHight = request["uvHight" + i].ToString().ToInt32().Value;
|
if (request["uvNum" + i] != null)
|
insideModel.UVNum = request["uvNum" + i].ToString().ToInt32().Value;
|
if (request["lyNum" + i] != null)
|
insideModel.LYNum = request["lyNum" + i].ToString().ToInt32().Value;
|
if (request["gildingType" + i] != null)
|
insideModel.GildingType = request["gildingType" + i].ToString();
|
model.InquiryInsideList.Add(insideModel);
|
}
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
AfterParameterInfoBLL _afterParameterInfoBLL = new AfterParameterInfoBLL();
|
SysInquiry_AfterParameterInfo bindingModeObj = _afterParameterInfoBLL.GetModel(model.BindingMode);
|
printDemand += model.PrintSizeName + "," + bindingModeObj.ParameterName;
|
printDemand += ",封面要求:" + paperInfo.PaperName + "";
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
if (model.PaperId != 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.SingleOrdouble + "," + model.PrintColor + ",4页";
|
printDemand += ";内页要求:";
|
foreach (InquiryInsideModel insideModelObj in model.InquiryInsideList)
|
{
|
printDemand += "内页" + insideModelObj.InsideIndex.ToString() + ":";
|
paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
|
printDemand += paperInfo.PaperName;
|
if (insideModelObj.PaperId != 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(insideModelObj.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + insideModelObj.GramWeight + "克";
|
}
|
printDemand += "," + insideModelObj.PrintColor + "," + insideModelObj.PageNum.ToString();
|
if (paperInfo.PaperName == "硫酸纸")
|
{
|
printDemand += "张";
|
}
|
else
|
{
|
printDemand += "页";
|
}
|
printDemand += ";";
|
}
|
if (!string.IsNullOrEmpty(printDemand))
|
{
|
printDemand = printDemand.Substring(0, printDemand.Length - 1);
|
}
|
bool IsCan = new InquiryBLL().IsCanMerge(model);
|
if (IsCan)
|
{
|
model.InquiryInsideList.SingleOrDefault<InquiryInsideModel>(p => p.InsideIndex == 1 && (p.PageNum += 4) == 1);
|
}
|
}
|
else if (model.PrintTypeId == 31) //广告纸杯
|
{
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CupType);
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += typeModel.TypeNmae + ",";
|
typeModel = _multipleTypeInfoBLL.GetModel(model.PaperMP.ToInt32().Value);
|
printDemand += typeModel.TypeNmae + "," + model.PrintColor;
|
}
|
else if (model.PrintTypeId == 32) //广告扑克
|
{
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CupType);
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += typeModel.TypeNmae;
|
}
|
else if (model.PrintTypeId == 34) //平面设计
|
{
|
model.PrintCount = 1;
|
model.PrintCountName = model.PrintCount.ToString();
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.SJType);
|
printDemand += typeModel.TypeNmae;
|
if (model.SJType == 53 || model.SJType == 54 || model.SJType == 55)
|
{
|
printDemand += "," + model.PageNum.ToString() + "页";
|
}
|
printDemand += "," + model.DesignerDemand;
|
}
|
else if (model.PrintTypeId == 35) //房卡套
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand += model.PrintSizeName + "," + paperInfo.PaperName;
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CoveredTypeId);
|
printDemand += "," + typeModel.TypeNmae;
|
}
|
else if (model.PrintTypeId == 17) //喷绘
|
{
|
model.PrintCount = 1;
|
model.PrintCountName = "1";
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CupType);
|
printDemand += model.BrushWidth.ToString() + "×" + model.BrushHight.ToString() + ",";
|
printDemand += typeModel.TypeNmae;
|
}
|
else if (model.PrintTypeId == 29) //黑白印件
|
{
|
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand = paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
printDemand += paperInfo.PaperName + ",";
|
if (model.PaperId != 0)
|
{
|
if (model.PrintMode == 0)
|
{
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.SingleOrdouble + "," + model.PrintColor;
|
}
|
else if (model.PrintTypeId == 22) //便签
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += "每本" + model.PageNum.ToString() + "页,";
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand += paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
if (model.PrintMode == 1)
|
{
|
printDemand += model.PaperMP;
|
}
|
else
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperMP.ToInt32().Value);
|
printDemand += paperInfo.PaperName;
|
}
|
int pId = -1;
|
if (model.PrintMode == 0)
|
{
|
pId = model.PaperMP.ToInt32().Value;
|
if (pId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
}
|
if (pId != 0)
|
{
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.PrintColor;
|
}
|
else if (model.PrintTypeId == 26) //封套
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand += paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
if (model.PrintMode == 1)
|
{
|
printDemand += model.PaperMP;
|
}
|
else
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperMP.ToInt32().Value);
|
printDemand += paperInfo.PaperName;
|
}
|
int pId = -1;
|
if (model.PrintMode == 0)
|
{
|
pId = model.PaperMP.ToInt32().Value;
|
if (paperId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
}
|
if (pId != 0)
|
{
|
printDemand += "," + model.GramWeight + "克";
|
}
|
}
|
else if (model.PrintTypeId == 16) //手提袋
|
{
|
if (model.AfterWorkList == null)
|
{
|
model.AfterWorkList = new List<int>();
|
}
|
if (model.PrintMode == 0)
|
{
|
model.AfterWorkList.Add(5);
|
model.AfterWorkList.Add(19);//粘手提袋必选
|
}
|
model.PrintCountName = model.PrintCount.ToString();
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand += paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
if (model.PrintMode == 1)
|
{
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo mTypeInfo = _multipleTypeInfoBLL.GetModel(model.PaperId);
|
printDemand += mTypeInfo.TypeNmae;
|
}
|
else
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand += paperInfo.PaperName;
|
}
|
if (model.PaperId != 0)
|
{
|
if (model.PrintMode == 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
printDemand += "," + model.GramWeight + "克";
|
}
|
}
|
else if (model.PrintTypeId == 21)//信封
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
printDemand += paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
}
|
if (model.PrintMode == 1)
|
{
|
printDemand += model.PaperMP;
|
|
}
|
else
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperMP.ToInt32().Value);
|
printDemand += paperInfo.PaperName;
|
}
|
int pId = -1;
|
if (model.PrintMode == 0)
|
{
|
pId = model.PaperMP.ToInt32().Value;
|
if (pId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
}
|
if (pId != 0)
|
{
|
printDemand += "," + model.GramWeight + "克";
|
}
|
if (model.PrintMode == 1)
|
{
|
printDemand += ",彩色";
|
}
|
else
|
{
|
printDemand += "," + model.PrintColor;
|
}
|
printDemand += "," + model.EnvelopType;
|
}
|
else if (model.PrintTypeId == 33) //PVC卡
|
{
|
if (request["lsType"] != null)
|
model.LsType = request["lsType"].ToString();
|
if (request["ktType"] != null)
|
model.KtType = request["ktType"].ToString();
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += model.PVCType + ",";
|
printDemand += model.PrintSizeName;
|
if (model.PVCType == "PVC卡")
|
{
|
//printDemand += "," + model.PVCThick;
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo mTypeInfo = _multipleTypeInfoBLL.GetModel(model.CupType);
|
printDemand += "," + mTypeInfo.TypeNmae;
|
}
|
}
|
else if (model.PrintTypeId == 7) //报纸
|
{
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
printDemand = paperSize.Name + ",";
|
}
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand += paperInfo.PaperName;
|
|
if (model.PaperId != 0)
|
{
|
if (model.PrintMode == 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
}
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.PageNum.ToString() + "版";
|
printDemand += "," + model.PrintColor;
|
}
|
else if (model.PrintTypeId == 27) //收据联单
|
{
|
if (request["rlNum"] != null)
|
model.RLNum = request["rlNum"].ToString();
|
if (request["thStart"] != null)
|
{
|
if (request["thStart"].ToString() != "")
|
model.ThStart = request["thStart"].ToString();
|
}
|
if (request["thEnd"] != null)
|
{
|
if (request["thStart"].ToString() != "")
|
model.ThEnd = request["thEnd"].ToString();
|
}
|
if (request["jtWZ"] != null)
|
model.JTWZ = request["jtWZ"].ToString();
|
if (request["frontType"] != null)
|
model.FrontType = request["frontType"].ToString();
|
if (request["pDemand"] != null)
|
model.pDemand = request["pDemand"].ToString();
|
if (model.PrintSizeId != -1)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += paperSize.Name + ",";
|
}
|
if (model.PrintMode == 1)
|
{
|
printDemand += model.PaperMP + ",";
|
|
}
|
else
|
{
|
model.AfterWorkList.Add(13);
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperMP.ToInt32().Value);
|
printDemand += paperInfo.PaperName;
|
if (model.PaperId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += ",每本" + model.PageNum + "份,";
|
}
|
printDemand += model.RLNum + ",";
|
printDemand += model.PrintColor + ",";
|
printDemand += "封面要求:";
|
printDemand += model.FrontType;
|
|
if (model.FrontType != "无封面")
|
{
|
printDemand += "," + model.pDemand;
|
}
|
|
}
|
else if (model.PrintTypeId == 23) //挂历
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperSizeDetail paperSize = null;
|
if (model.PrintSizeId == -1)
|
{
|
model.IsDefinedSize = 1;
|
if (request["SelSize"] != null)
|
model.PrintSizeId = request["SelSize"].ToString().ToInt32().Value;
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
sizeName = paperSize.Name;
|
int index = sizeName.IndexOf('(');
|
sizeName = sizeName.Substring(0, index);
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
sizeName += "(" + request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString() + ")";
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintSizeName = sizeName;
|
}
|
else
|
{
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
}
|
printDemand += model.PrintSizeName + ",";
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand += paperInfo.PaperName;
|
if (model.PaperId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += ",每本" + model.PageNum.ToString() + "张";
|
}
|
else if (model.PrintTypeId == 19) //LED显示屏
|
{
|
if(request["ledMaterial"]!=null)
|
model.LedMaterial=request["ledMaterial"].ToString().ToInt32().Value;
|
if (request["isInstall"] != null)
|
model.IsInstall = request["isInstall"].ToString().ToInt32().Value;
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
SysInquiry_LEDMaterialBLL _ledMaterialBLL=new SysInquiry_LEDMaterialBLL();
|
SysInquiry_LEDMaterial ledMaterialModel=_ledMaterialBLL.SelectModelByKey(model.LedMaterial);
|
model.PrintCount = 1;
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand = model.firstSize + "×" + model.secondSize + "㎡,";
|
printDemand += ledMaterialModel.Name + ",";
|
if (model.IsInstall == 0)
|
{
|
printDemand += "不安装";
|
}
|
else
|
{
|
printDemand += "安装";
|
}
|
}
|
else if (model.PrintTypeId == 18) //招牌字
|
{
|
if (request["signboardCharacter"] != null)
|
model.CharacterName = request["signboardCharacter"].ToString();
|
if (request["thickness"] != null)
|
model.Thickness = request["thickness"].ToString();
|
if (string.IsNullOrEmpty(model.Thickness))
|
{
|
model.Thickness = string.Empty;
|
}
|
if (request["isInstall"] != null)
|
model.IsInstall = request["isInstall"].ToString().ToInt32().Value;
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintCount = 1;
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand = model.firstSize + "×" + model.secondSize + "㎡,";
|
if (!string.IsNullOrEmpty(model.Thickness))
|
{
|
printDemand += model.PageNum.ToString() + "个厚度为" + model.Thickness + "的" + model.CharacterName + ",";
|
}
|
else
|
{
|
printDemand += model.PageNum.ToString() + "个" + model.CharacterName + ",";
|
}
|
if (model.IsInstall == 0)
|
{
|
printDemand += "不安装";
|
}
|
else
|
{
|
printDemand += "安装";
|
}
|
}
|
else if (model.PrintTypeId == 25) //台历
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperSizeDetail paperSize = null;
|
if (model.PrintSizeId == -1)
|
{
|
model.IsDefinedSize = 1;
|
if (request["SelSize"] != null)
|
model.PrintSizeId = request["SelSize"].ToString().ToInt32().Value;
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
sizeName = paperSize.Name;
|
int index = sizeName.IndexOf('(');
|
sizeName = sizeName.Substring(0, index);
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
sizeName += "(" + request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString() + ")";
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintSizeName = sizeName;
|
}
|
else
|
{
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
}
|
printDemand += model.PrintSizeName + ",";
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand += paperInfo.PaperName;
|
if (model.PaperId != 0)
|
{
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
|
printDemand += "(" + brandInfo.BrandName + ")";
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += ",每本" + model.PageNum.ToString() + "张";
|
|
InquiryInsideModel insideModel = new InquiryInsideModel();
|
if (request["txtBaseFirstSize"] != null)
|
{
|
if (!string.IsNullOrEmpty(request["txtBaseFirstSize"].ToString()))
|
insideModel.BaseFirstSize = request["txtBaseFirstSize"].ToString();
|
}
|
if (request["txtBaseSecondSize"] != null)
|
{
|
if (!string.IsNullOrEmpty(request["txtBaseSecondSize"].ToString()))
|
insideModel.BaseSecondSize = request["txtBaseSecondSize"].ToString();
|
}
|
works = string.Empty;
|
if (request["works1"] != null)
|
{
|
works = request["works1"].ToString();
|
if (!string.IsNullOrEmpty(works))
|
{
|
string[] workArry = works.Split(',');
|
insideModel.AfterWorkList = new List<int>();
|
foreach (string workStr in workArry)
|
{
|
insideModel.AfterWorkList.Add(workStr.ToInt32().Value);
|
}
|
if (request["tjWith1"] != null)
|
insideModel.TJWith = request["tjWith1"].ToString().ToInt32().Value;
|
if (request["tjHight1"] != null)
|
insideModel.TJHight = request["tjHight1"].ToString().ToInt32().Value;
|
if (request["uvWith1"] != null)
|
insideModel.UVWith = request["uvWith1"].ToString().ToInt32().Value;
|
if (request["uvHight1"] != null)
|
insideModel.UVHight = request["uvHight1"].ToString().ToInt32().Value;
|
if (request["gildingType1"] != null)
|
insideModel.GildingType = request["gildingType1"].ToString();
|
}
|
}
|
model.InquiryInsideList.Add(insideModel);
|
}
|
else if (model.PrintTypeId == 36) //数码快印
|
{
|
if (request["selDigitalPrintType"] != null)
|
{
|
model.DigitalPrintType = request["selDigitalPrintType"].ToString();
|
}
|
if (request["selCovered"] != null)
|
{
|
model.CoveredTypeId = request["selCovered"].ToString().ToInt32().Value;
|
}
|
if (request["selEmboss"] != null)
|
{
|
model.EmbossTypeId = request["selEmboss"].ToString().ToInt32().Value;
|
}
|
model.PrintCountName = model.PrintCount.ToString();
|
|
printDemand += model.DigitalPrintType+"数码快印;";
|
SysInquiry_DigitalPrintPaperInfoBLL _printPaperInfoBLL = new SysInquiry_DigitalPrintPaperInfoBLL();
|
if (model.DigitalPrintType == "单张")
|
{
|
printDemand += model.PrintSizeName + ";";
|
SysInquiry_DigitalPrintPaperInfo printPaperInfo = _printPaperInfoBLL.SelectModelByKey(model.PaperId);
|
printDemand += model.GramWeight.ToString() + "克" + printPaperInfo.PaperName + ";";
|
printDemand += model.PrintColor + "印刷;";
|
printDemand += model.SingleOrdouble;
|
}
|
else
|
{
|
SysInquiry_PaperSizeDetail paperSize = null;
|
if (model.PrintSizeId == -1)
|
{
|
model.IsDefinedSize = 1;
|
if (request["SelSize"] != null)
|
model.PrintSizeId = request["SelSize"].ToString().ToInt32().Value;
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(6, model.PrintSizeId);
|
sizeName = paperSize.Name;
|
int index = sizeName.IndexOf('(');
|
sizeName = sizeName.Substring(0, index);
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
sizeName += "(" + request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString() + ")";
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
model.PrintSizeName = sizeName;
|
}
|
else
|
{
|
paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(6, model.PrintSizeId);
|
model.PrintSizeName = paperSize.Name;
|
}
|
int insidePageNum = 1;
|
if (request["hidInsidePageNum"] != null)
|
insidePageNum = request["hidInsidePageNum"].ToString().ToInt32().Value;
|
InquiryInsideModel insideModel = null;
|
for (int i = 1; i <= insidePageNum; i++)
|
{
|
works = string.Empty;
|
insideModel = new InquiryInsideModel();
|
insideModel.InsideIndex = i;
|
if (request["paper" + i] != null)
|
{
|
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
|
}
|
if (request["gramWeight" + i] != null)
|
insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
|
if (request["printColor" + i] != null)
|
insideModel.PrintColor = request["printColor" + i].ToString();
|
if (request["pageNum" + i] != null)
|
insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
|
if (request["works" + i] != null)
|
works = request["works" + i].ToString();
|
if (!string.IsNullOrEmpty(works))
|
{
|
string[] workArry = works.Split(',');
|
insideModel.AfterWorkList = new List<int>();
|
foreach (string workStr in workArry)
|
{
|
insideModel.AfterWorkList.Add(workStr.ToInt32().Value);
|
}
|
}
|
if (request["tjWith" + i] != null)
|
insideModel.TJWith = request["tjWith" + i].ToString().ToInt32().Value;
|
if (request["tjHight" + i] != null)
|
insideModel.TJHight = request["tjHight" + i].ToString().ToInt32().Value;
|
if (request["tjNum" + i] != null)
|
insideModel.TJNum = request["tjNum" + i].ToString().ToInt32().Value;
|
if (request["uvWith" + i] != null)
|
insideModel.UVWith = request["uvWith" + i].ToString().ToInt32().Value;
|
if (request["uvHight" + i] != null)
|
insideModel.UVHight = request["uvHight" + i].ToString().ToInt32().Value;
|
if (request["uvNum" + i] != null)
|
insideModel.UVNum = request["uvNum" + i].ToString().ToInt32().Value;
|
if (request["lyNum" + i] != null)
|
insideModel.LYNum = request["lyNum" + i].ToString().ToInt32().Value;
|
if (request["gildingType" + i] != null)
|
insideModel.GildingType = request["gildingType" + i].ToString();
|
model.InquiryInsideList.Add(insideModel);
|
}
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
SysInquiry_DigitalPrintPaperInfo printPaperInfo = _printPaperInfoBLL.SelectModelByKey(model.PaperId);
|
AfterParameterInfoBLL _afterParameterInfoBLL = new AfterParameterInfoBLL();
|
SysInquiry_AfterParameterInfo bindingModeObj = _afterParameterInfoBLL.GetModel(model.BindingMode);
|
printDemand += model.PrintSizeName + "," + bindingModeObj.ParameterName;
|
printDemand += ",封面要求:" + printPaperInfo.PaperName + "";
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
if (printPaperInfo.PaperName!="自带纸")
|
{
|
printDemand += "," + model.GramWeight + "克";
|
}
|
printDemand += "," + model.SingleOrdouble + "," + model.PrintColor + ",4页";
|
printDemand += ";内页要求:";
|
foreach (InquiryInsideModel insideModelObj in model.InquiryInsideList)
|
{
|
printDemand += "内页" + insideModelObj.InsideIndex.ToString() + ":";
|
printPaperInfo = _printPaperInfoBLL.SelectModelByKey(insideModelObj.PaperId);
|
printDemand += printPaperInfo.PaperName;
|
if (printPaperInfo.PaperName != "自带纸")
|
{
|
printDemand += "," + insideModelObj.GramWeight + "克";
|
}
|
printDemand += "," + insideModelObj.PrintColor + "," + insideModelObj.PageNum.ToString();
|
if (printPaperInfo.PaperName == "硫酸纸")
|
{
|
printDemand += "张";
|
}
|
else
|
{
|
printDemand += "页";
|
}
|
printDemand += ";";
|
}
|
if (!string.IsNullOrEmpty(printDemand))
|
{
|
printDemand = printDemand.Substring(0, printDemand.Length - 1);
|
}
|
}
|
}
|
else if (model.PrintTypeId == 20) //不干胶
|
{
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
}
|
if (request["Shape"] != null)
|
model.Shape = request["Shape"].ToString();
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand = model.firstSize + "×" + model.secondSize + "mm,";
|
printDemand += model.Shape;
|
}
|
//判断尺寸
|
if (request["hidOrderId"].ToInt32() >= 0)
|
{
|
if (model.PrintSizeId ==-1)
|
{
|
model.IsDefinedSize = 1;
|
string newsSizeName = string.Empty;
|
if (request["txtFirstSize"] != null && request["txtSecondSize"] != null)
|
{
|
newsSizeName = request["txtFirstSize"].ToString() + "×" + request["txtSecondSize"].ToString();
|
model.firstSize = request["txtFirstSize"].ToString();
|
model.secondSize = request["txtSecondSize"].ToString();
|
if (model.PrintTypeId == 16)
|
{
|
if (request["txtThirdSize"] != null)
|
{
|
model.thirdSize = request["txtThirdSize"].ToString();
|
newsSizeName = newsSizeName + "×" + model.thirdSize;
|
}
|
}
|
}
|
model.PrintSizeName = newsSizeName;
|
if (!string.IsNullOrEmpty(sizeName))
|
{
|
printDemand = printDemand.Replace(sizeName, newsSizeName);
|
}
|
else
|
{
|
newsSizeName += ";";
|
printDemand = printDemand.Insert(0, newsSizeName);
|
}
|
}
|
}
|
model.PrintDemand = printDemand;
|
if ((model.PrintTypeId == 21 && model.PrintMode == 1) || model.PrintTypeId == 19)
|
{
|
model.AfterWorksDemand = string.Empty;
|
}
|
else
|
{
|
model.AfterWorksDemand = GetAfterWorksStr(model, model.PrintTypeId);
|
}
|
string deliveryModeName = string.Empty;
|
if (model.DeliveryMode == 104)
|
{
|
deliveryModeName = "自提";
|
}
|
else if (model.DeliveryMode == 105)
|
{
|
deliveryModeName = "代发货运";
|
}
|
else if (model.DeliveryMode == 106)
|
{
|
deliveryModeName = "送货上门";
|
}
|
else if (model.DeliveryMode == 107)
|
{
|
deliveryModeName = "指定货运公司";
|
}
|
model.DeliveryModeName = deliveryModeName;
|
string billModeName = string.Empty;
|
if (model.BillMode == 108)
|
{
|
billModeName = "不含税价";
|
}
|
else if (model.BillMode == 109)
|
{
|
billModeName = "普通发票";
|
}
|
else
|
{
|
billModeName = "增值税票";
|
}
|
model.BillModeName = billModeName;
|
}
|
catch(Exception ex)
|
{
|
model = null;
|
}
|
return model;
|
}
|
|
/// <summary>
|
/// 获取后道参数
|
/// </summary>
|
/// <param name="model"></param>
|
/// <param name="PrintTypeId"></param>
|
public static string GetAfterWorksStr(InquiryCommonModel model,int printTypeId)
|
{
|
AfterParameterInfoBLL _afterParameterInfoBLL=new AfterParameterInfoBLL();
|
string afterWorkStr = string.Empty;
|
if (model.AfterWorkList != null && model.AfterWorkList.Count > 0)
|
{
|
if (printTypeId == 25)
|
{
|
afterWorkStr += "封面工艺:";
|
}
|
if (printTypeId == 15 || printTypeId == 6)
|
{
|
afterWorkStr += "封面后道:";
|
}
|
if (printTypeId == 23)
|
{
|
afterWorkStr += "装订工艺:";
|
}
|
foreach (int workId in model.AfterWorkList)
|
{
|
SysInquiry_AfterParameterInfo afterInfo = _afterParameterInfoBLL.GetModel(workId);
|
if (printTypeId != 13 && printTypeId != 33)
|
{
|
if (afterInfo.ParameterName == "烫金")
|
{
|
if (printTypeId != 15 && printTypeId != 16 && printTypeId != 6)
|
{
|
afterInfo.ParameterName = "烫金(" + model.TJWith + "×" + model.TJHight + ")";
|
}
|
else
|
{
|
afterInfo.ParameterName = model.GildingType + "(" + model.TJWith + "×" + model.TJHight + ")";
|
}
|
}
|
else if (afterInfo.ParameterName == "烫银")
|
{
|
afterInfo.ParameterName = "烫银(" + model.TYWith + "×" + model.TYHight + ")";
|
}
|
else if (afterInfo.ParameterName == "UV")
|
{
|
afterInfo.ParameterName = "UV(" + model.UVWith + "×" + model.UVHight + ")";
|
}
|
else if (afterInfo.ParameterName == "击凹凸")
|
{
|
afterInfo.ParameterName = "击凹凸(" + model.ATWith + "×" + model.ATHight + ")";
|
}
|
else if (afterInfo.ParameterName == "拉封")
|
{
|
afterInfo.ParameterName = model.LaFeng;
|
}
|
}
|
if (printTypeId == 33)
|
{
|
if (afterInfo.ParameterName == "挂绳")
|
{
|
if (model.LsType == "印字")
|
{
|
afterInfo.ParameterName = "印字挂绳";
|
}
|
else
|
{
|
afterInfo.ParameterName = "普通挂绳";
|
}
|
}
|
|
if (afterInfo.ParameterName == "卡套")
|
{
|
if (model.KtType == "真皮卡套")
|
{
|
afterInfo.ParameterName = "真皮卡套";
|
}
|
else if (model.KtType == "塑料卡套")
|
{
|
afterInfo.ParameterName = "塑料卡套";
|
}
|
else
|
{
|
afterInfo.ParameterName = "塑料软胶";
|
}
|
}
|
}
|
if (printTypeId == 36)
|
{
|
SysInquiry_AfterParameterInfo tempafterInfo = null;
|
if (afterInfo.ParameterName == "覆膜")
|
{
|
tempafterInfo = _afterParameterInfoBLL.GetModel(model.CoveredTypeId);
|
afterInfo.ParameterName = tempafterInfo.ParameterName;
|
}
|
if (afterInfo.ParameterName == "压纹")
|
{
|
tempafterInfo = _afterParameterInfoBLL.GetModel(model.EmbossTypeId);
|
afterInfo.ParameterName = tempafterInfo.ParameterName;
|
}
|
}
|
if (afterInfo.ParameterName == "胶头")
|
{
|
if(model.PrintTypeId!=27)
|
afterInfo.ParameterName = "胶头(每本" + model.PageNum.ToString() + "页)";
|
}
|
afterWorkStr += afterInfo.ParameterName + ",";
|
}
|
if (!string.IsNullOrEmpty(afterWorkStr))
|
{
|
afterWorkStr = afterWorkStr.Substring(0, afterWorkStr.Length - 1);
|
}
|
if (model.PrintTypeId == 16)
|
{
|
SysInquiry_RopeTypeBLL _sysInquiry_RopeTypeBLL = new SysInquiry_RopeTypeBLL();
|
SysInquiry_RopeType ropeTypeModel = _sysInquiry_RopeTypeBLL.SelectModelByKey(model.RopeTypeId);
|
afterWorkStr += "," + ropeTypeModel.RopeTypeName + "(" + model.RopeColor + ")";
|
}
|
|
}
|
//if (model.PrintTypeId == 27)
|
//{
|
// afterWorkStr += "套号号段(" + model.ThStart.ToString() + "-" + model.ThEnd.ToString() + ")";
|
// afterWorkStr += "," + model.JTWZ;
|
//}
|
|
if (model.PrintTypeId == 25)
|
{
|
|
InquiryInsideModel insideModel = model.InquiryInsideList[0];
|
if (!string.IsNullOrEmpty(insideModel.BaseFirstSize) && !string.IsNullOrEmpty(insideModel.BaseSecondSize))
|
{
|
if (afterWorkStr != string.Empty)
|
afterWorkStr += ";";
|
afterWorkStr += "底座工艺:";
|
|
afterWorkStr += "底座尺寸:" + insideModel.BaseFirstSize + "×" + insideModel.BaseSecondSize+"mm,";
|
}
|
if (insideModel.AfterWorkList != null && insideModel.AfterWorkList.Count > 0)
|
{
|
if (!afterWorkStr.Contains("底座工艺"))
|
{
|
if (afterWorkStr != string.Empty)
|
afterWorkStr += ";";
|
afterWorkStr += "底座工艺:";
|
}
|
foreach (int workId in insideModel.AfterWorkList)
|
{
|
SysInquiry_AfterParameterInfo afterInfo = _afterParameterInfoBLL.GetModel(workId);
|
if (afterInfo.ParameterName == "烫金")
|
{
|
afterInfo.ParameterName = insideModel.GildingType + "(" + insideModel.TJWith + "×" + insideModel.TJHight + ")";
|
}
|
else if (afterInfo.ParameterName == "UV")
|
{
|
afterInfo.ParameterName = "UV(" + insideModel.UVWith + "×" + insideModel.UVHight + ")";
|
}
|
afterWorkStr += afterInfo.ParameterName + ",";
|
}
|
}
|
if (afterWorkStr.EndsWith(","))
|
{
|
afterWorkStr = afterWorkStr.Substring(0, afterWorkStr.Length - 1);
|
}
|
if (afterWorkStr != "")
|
{
|
afterWorkStr += ";";
|
}
|
afterWorkStr += "装订费";
|
}
|
|
if (((model.PrintTypeId == 15||model.PrintTypeId==6) && model.PrintMode == 0)||(model.PrintTypeId==36&&model.DigitalPrintType!="单张"))
|
{
|
if (model.InquiryInsideList != null && model.InquiryInsideList.Count > 0)
|
{
|
IList<InquiryInsideModel> tempList = model.InquiryInsideList.Where(p => p.AfterWorkList.Count > 0).ToList<InquiryInsideModel>();
|
if (tempList!=null&&tempList.Count>0)
|
{
|
if (afterWorkStr != string.Empty)
|
afterWorkStr += ";";
|
afterWorkStr += "内页后道:";
|
}
|
foreach (InquiryInsideModel insideModel in model.InquiryInsideList)
|
{
|
|
if (insideModel.AfterWorkList != null && insideModel.AfterWorkList.Count > 0)
|
{
|
afterWorkStr += "内页" + insideModel.InsideIndex + ":";
|
foreach (int workId in insideModel.AfterWorkList)
|
{
|
SysInquiry_AfterParameterInfo afterInfo = _afterParameterInfoBLL.GetModel(workId);
|
if (afterInfo.ParameterName == "烫金")
|
{
|
afterInfo.ParameterName = insideModel.GildingType + "(" + insideModel.TJWith + "×" + insideModel.TJHight + ")"+insideModel.TJNum.ToString()+"处";
|
}
|
else if (afterInfo.ParameterName == "UV")
|
{
|
afterInfo.ParameterName = "UV(" + insideModel.UVWith + "×" + insideModel.UVHight + ")" + insideModel.UVNum.ToString() + "处";
|
}
|
else if (afterInfo.ParameterName == "拉页")
|
{
|
afterInfo.ParameterName = "拉页"+ insideModel.LYNum.ToString() + "处";
|
}
|
afterWorkStr += afterInfo.ParameterName + ",";
|
}
|
if (afterWorkStr.EndsWith(","))
|
{
|
afterWorkStr = afterWorkStr.Substring(0, afterWorkStr.Length - 1);
|
}
|
afterWorkStr += ";";
|
}
|
}
|
if (afterWorkStr.EndsWith(";"))
|
{
|
afterWorkStr = afterWorkStr.Substring(0, afterWorkStr.Length-1);
|
}
|
}
|
}
|
return afterWorkStr;
|
}
|
|
#endregion
|
|
#region 事件
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
GetMyAcceptAddress();
|
SetPrintName();
|
}
|
|
string result = string.Empty;
|
|
if (Request["PaperInit"] != null)
|
{
|
int printTypeId = Request["PrinttypeId"].ToString().ToInt32().Value;
|
CY.BLL.Inquiry.RangeofBusinessBLL _rangeofBusinessBLL = new CY.BLL.Inquiry.RangeofBusinessBLL();
|
IList<CY.Model.SysInquiry_PaperInfo> paperInfoList = _rangeofBusinessBLL.GetPaperInfo(printTypeId);
|
string str = string.Empty;
|
foreach (CY.Model.SysInquiry_PaperInfo peper in paperInfoList)
|
{
|
str += "{paperId:"+peper.PapeId+",paperName:\""+peper.PaperName+"\"},";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
result = "{paperInfo:[" + str + "]";
|
|
CY.BLL.Inquiry.PaperSizeDetailBLL _paperSizeDetailBLL = new CY.BLL.Inquiry.PaperSizeDetailBLL();
|
List<CY.Model.SysInquiry_PaperSizeDetail> paperSizeList = _paperSizeDetailBLL.GetPaperSizeList(PrintTypeId);
|
str = string.Empty;
|
foreach (CY.Model.SysInquiry_PaperSizeDetail size in paperSizeList)
|
{
|
str += "{sizeId:" + size.KeyId + ",sizeName:\"" + size.Name + "\"},";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
result += ",sizeInfo:[" + str + "]}";
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["PaperSelect"] != null)
|
{
|
int printTypeId = Request["PrinttypeId"].ToString().ToInt32().Value;
|
int paperId=Request["PaperId"].ToString().ToInt32().Value;
|
IList<SysInquiry_BrandInfo> brandList = _paperInfoBLL.GetBrandInfoByPaper(paperId);
|
string str = string.Empty;
|
string brandListStr = string.Empty;
|
int defaultBrandId = -1;
|
if (brandList != null && brandList.Count > 0)
|
{
|
defaultBrandId=brandList[0].KeyId;
|
foreach (SysInquiry_BrandInfo brand in brandList)
|
{
|
str += "{brandKey:" + brand.KeyId + ",brandName:'" + brand.BrandName + "'},";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
}
|
brandListStr = "[" + str + "]";
|
|
IList<int> gramWeightList = _rangeofBusinessBLL.GramWeightByPrintTypeId(printTypeId, paperId, defaultBrandId);
|
str = string.Empty;
|
foreach (int gramWeight in gramWeightList)
|
{
|
str += gramWeight.ToString() + "|";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
result = "{brandListStr:" + brandListStr + ",gramWeights:\"" + str + "\"}";
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["RopeTypeNameInit"] != null)
|
{
|
int printTypeId = Request["PrinttypeId"].ToString().ToInt32().Value;
|
RopeCostBLL _ropeCostBLL = new RopeCostBLL();
|
IList<string> ropeTypeList = _ropeCostBLL.GetRopeTypeList(printTypeId);
|
foreach (string typeName in ropeTypeList)
|
{
|
result += typeName + "|";
|
}
|
if (!string.IsNullOrEmpty(result))
|
{
|
result = result.Substring(0, result.Length - 1);
|
}
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["BrandSelect"] != null)
|
{
|
int printTypeId = Request["PrinttypeId"].ToString().ToInt32().Value;
|
int paperId = Request["PaperId"].ToString().ToInt32().Value;
|
int brandId = Request["BrandId"].ToString().ToInt32().Value;
|
IList<int> gramWeightList = _rangeofBusinessBLL.GramWeightByPrintTypeId(printTypeId, paperId, brandId);
|
string str = string.Empty;
|
foreach (int gramWeight in gramWeightList)
|
{
|
str += gramWeight.ToString() + "|";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
result = str;
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["BindControl"] != null)
|
{
|
int orderId = Request["OrderId"].ToString().ToInt32().Value;
|
EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL();
|
EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderId);
|
InquiryCommonModel _inquiryCommonModel = null;
|
if (null != _eC_OrderPrintParameter)
|
{
|
_inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
|
}
|
result = JsonHelper.GetJsonStringByObject(_inquiryCommonModel);
|
Response.Write(result);
|
Response.End();
|
}
|
if (Request["BindControl1"] != null)
|
{
|
int orderId = Request["OrderId"].ToString().ToInt32().Value;
|
OA_CorporateClientsBLL oA_CorporateClientsBLL = new OA_CorporateClientsBLL();
|
OA_CorporateClientsParameter _eC_OrderPrintParameter = oA_CorporateClientsBLL.GetModelParameter(orderId);
|
InquiryCommonModel _inquiryCommonModel = null;
|
if (null != _eC_OrderPrintParameter)
|
{
|
_inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
|
}
|
result = JsonHelper.GetJsonStringByObject(_inquiryCommonModel);
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["SelSizeType"] != null)
|
{
|
int printTypeId = Request["PrinttypeId"].ToString().ToInt32().Value;
|
CY.BLL.Inquiry.PaperSizeDetailBLL _paperSizeDetailBLL = new CY.BLL.Inquiry.PaperSizeDetailBLL();
|
List<CY.Model.SysInquiry_PaperSizeDetail> paperSizeList = _paperSizeDetailBLL.GetPaperSizeList(printTypeId);
|
List<CY.Model.SysInquiry_PaperSizeDetail> newSizeList = new List<SysInquiry_PaperSizeDetail>();
|
List<CY.Model.SysInquiry_PaperSizeDetail> tempList = new List<SysInquiry_PaperSizeDetail>();
|
if (paperSizeList != null && paperSizeList.Count > 0)
|
{
|
SysInquiry_PaperSizeDetail newSize = null;
|
foreach (SysInquiry_PaperSizeDetail size in paperSizeList)
|
{
|
newSize = new SysInquiry_PaperSizeDetail();
|
newSize.KeyId = size.KeyId;
|
int index=size.Name.IndexOf('(');
|
newSize.Name = size.Name.Substring(0, index);
|
tempList = newSizeList.Where(p => p.Name == newSize.Name).ToList<SysInquiry_PaperSizeDetail>();
|
if (tempList == null || tempList.Count == 0)
|
{
|
newSizeList.Add(newSize);
|
}
|
}
|
}
|
string str = string.Empty;
|
foreach (CY.Model.SysInquiry_PaperSizeDetail size in newSizeList)
|
{
|
str += "{sizeId:" + size.KeyId + ",sizeName:\"" + size.Name + "\"},";
|
}
|
if (!string.IsNullOrEmpty(str))
|
{
|
str = str.Substring(0, str.Length - 1);
|
}
|
result = "[" + str + "]";
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["CharacterSelect"] != null)
|
{
|
string characterName = Request["CharacterName"].ToString();
|
SysInquiry_SignboardInfoBLL signboardInfoBLL = new SysInquiry_SignboardInfoBLL();
|
IList<string> thicknessList = signboardInfoBLL.GetThicknessList(characterName);
|
if (thicknessList.Count > 0)
|
{
|
foreach (string thickness in thicknessList)
|
{
|
result += thickness+"|";
|
}
|
}
|
if (!string.IsNullOrEmpty(result))
|
result = result.Substring(0, result.Length - 1);
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["IsLogin"] != null)
|
{
|
if (CurrentUser == null)
|
{
|
result = "1";
|
}
|
else
|
{
|
string fid =string.Empty;
|
if (Request["fid"] != null)
|
{
|
fid = Request["fid"].ToString();
|
if (Guid.Parse(fid) == CurrentUser.MemberId)
|
{
|
result = "2";
|
}
|
else
|
{
|
result = "3";
|
}
|
}
|
else
|
{
|
result = "3";
|
}
|
}
|
Response.Write(result);
|
Response.End();
|
}
|
|
if (Request["DigitalPaperSelect"] != null)
|
{
|
int paperId = Request["paperId"].ToString().ToInt32().Value;
|
SysInquiry_DigitalPrintPaperInfoBLL _paperInfoBLL = new SysInquiry_DigitalPrintPaperInfoBLL();
|
SysInquiry_DigitalPrintPaperInfo paperInfo = _paperInfoBLL.SelectModelByKey(paperId);
|
string gramWeights = string.Empty;
|
if (paperInfo != null)
|
{
|
gramWeights = paperInfo.GramWeights;
|
}
|
Response.Write(gramWeights);
|
Response.End();
|
}
|
|
if (Request["sumit"] != null)
|
{
|
int pageIndex = 1;
|
int pageSize = 5;
|
int orderType = -1;
|
string firmName = string.Empty;
|
string isDemand = string.Empty;
|
string selectProvince = string.Empty;
|
string selectCity = string.Empty;
|
string selectCounty = string.Empty;
|
if (Request["hidPageIndex"] != null)
|
pageIndex = Request["hidPageIndex"].ToString().ToInt32().Value;
|
if (Request["orderType"] != null)
|
orderType = Request["orderType"].ToString().ToInt32().Value;
|
if (Request["firmName"] != null)
|
firmName = Request["firmName"].ToString();
|
if (Request["hidIsDemand"] != null)
|
isDemand = Request["hidIsDemand"].ToString();
|
if (Request["selectProvince"] != null)
|
selectProvince = Request["selectProvince"].ToString();
|
if (Request["selectCity"] != null)
|
selectCity = Request["selectCity"].ToString();
|
if (Request["selectCounty"]!=null)
|
selectCounty = Request["selectCounty"].ToString();
|
InquiryCommonModel model = GetInquiryCommonModel();
|
if (model != null)
|
{
|
string xmlStr = InquiryBLL.GetInquiryCommonModelXMLStr(model);
|
xmlStr = SerializationHelper.EncryptDES(xmlStr, "ssssssss");
|
int index = xmlStr.Length / 2;
|
string xmlStr1 = xmlStr.Substring(0, index);
|
string xmlStr2 = xmlStr.Substring(index, xmlStr.Length - index);
|
Utils.WriteCookie("InquiryRecord1", xmlStr1);
|
Utils.WriteCookie("InquiryRecord2", xmlStr2);
|
InquiryBLL _inquiryBLL = new InquiryBLL();
|
int pageCount = 0;
|
Guid memberId = Guid.Empty;
|
if (CurrentUser != null)
|
{
|
memberId = CurrentUser.MemberId;
|
}
|
//发布需求
|
if (isDemand == "1")
|
{
|
if (!string.IsNullOrEmpty(model.PrintDemand))
|
{
|
EC_QuoteDemandBLL _QuoteDemandBLL = new EC_QuoteDemandBLL();
|
EC_MemberBasicBLL _memberBasicBLL = new EC_MemberBasicBLL();
|
EC_QuoteDemand demand = new EC_QuoteDemand();
|
demand.MemberId = CurrentUser.MemberId;
|
demand.PrintTypeId = -1;
|
demand.DemandName = model.PrintTypeName;
|
demand.DemandDemand = model.PrintDemand;
|
if (!string.IsNullOrEmpty(model.AfterWorksDemand))
|
{
|
demand.DemandDemand += ";后道工序:" + model.AfterWorksDemand;
|
}
|
demand.Remark = model.PrintCount.ToString();
|
demand.CallTypeId = 1;
|
demand.State = 0;
|
demand.Operator = CurrentUser.ShortName;
|
demand.ContactPhone = CurrentMemberExtend.PhoneNum;
|
demand.QQ = CurrentMemberExtend.QQ;
|
demand.CreateTime = DateTime.Now;
|
demand.LastUpdateTime = DateTime.Now;
|
demand.EndTime = DateTime.Now.AddDays(3);
|
if (_QuoteDemandBLL.CanInsertModel(CurrentUser.MemberId, demand.DemandDemand))
|
{
|
bool isSuccess = _QuoteDemandBLL.AddData(demand);
|
if (isSuccess)
|
{
|
//WebUtil.UpdateCacheByCoverWay(CacheDataFiles.QuoteDemand);
|
Pay_PaymentAccountBLL _pay_PaymentAccountBLL = new Pay_PaymentAccountBLL();
|
if (_QuoteDemandBLL.IsTodayHasValue(CurrentUser.MemberId))
|
_pay_PaymentAccountBLL.SendPoOrMoToMember(CurrentUser.MemberId, 38, null);
|
}
|
}
|
}
|
}
|
IList<InquiryResultModel> inquiryResultList = _inquiryBLL.GetInquiryResultByCommonList(model, memberId, orderType, firmName, selectProvince, selectCity, selectCounty, pageIndex, pageSize, ref pageCount);
|
string jsonStr = JsonHelper.GetJsonStringByObject(inquiryResultList);
|
result = "{ pageCount:" + pageCount + ",inquiryList:" + jsonStr + "}";
|
Response.Write(result);
|
}
|
Response.End();
|
}
|
}
|
#endregion
|
}
|
}
|