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.WebForm.Pages.front;
|
using CY.BLL;
|
|
namespace CY.WebForm.Pages.Templet.Default
|
{
|
public partial class CompanyInquiryOnLine : TempletBasePage
|
{
|
|
#region 变量
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
RangeofBusinessBLL _rangeofBusinessBLL = new RangeofBusinessBLL();
|
SysInquiry_PrintingTypeBLL _sysInquiry_PrintingTypeBLL = new SysInquiry_PrintingTypeBLL();
|
public Guid BussinessID = Guid.Empty;
|
#endregion
|
|
#region 属性
|
public string PrintName { get; set; }
|
|
public int PrintTypeId { get; set; }
|
|
#endregion
|
|
#region 方法
|
public void SetPrintName()
|
{
|
if (Request["PrintTypeId"] != null)
|
{
|
int printTypeId = Request["PrintTypeId"].ToString().ToInt32().Value;
|
Session["PrintTypeId"]= Request["PrintTypeId"].ToString().ToInt32().Value;
|
PrintTypeId = printTypeId;
|
SysInquiry_PrintingType model = _sysInquiry_PrintingTypeBLL.GetModelById(printTypeId);
|
PrintName = model.PrintName;
|
this.PrintTypeList.PrintTypeId = printTypeId.ToString();
|
}
|
}
|
|
/// <summary>
|
/// 获取询价参数
|
/// </summary>
|
public static InquiryCommonModel GetInquiryCommonModel()
|
{
|
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;
|
string ropeTypeName = string.Empty;
|
string ropeColor = string.Empty;
|
string envelopType = string.Empty;
|
string pvcType = string.Empty;
|
string pvcThick = string.Empty;
|
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["singleOrdouble"] != null)
|
singleOrdouble = request["singleOrdouble"].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["printColor"] != null)
|
printColor = request["printColor"].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["RopeTypeName"] != null)
|
ropeTypeName = request["RopeTypeName"].ToString();
|
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();
|
InquiryCommonModel model = new InquiryCommonModel();
|
model.PrintTypeId = printTypeId;
|
model.PrintMode = printMode;
|
model.PrintSizeId = sizeId;
|
model.PaperId = paperId;
|
model.GramWeight = gramWeight;
|
model.BrandId = brandId;
|
model.PrintCount = printCount;
|
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.RopeColor = ropeColor;
|
model.EnvelopType = envelopType;
|
model.PVCType = pvcType;
|
model.PVCThick = pvcThick;
|
if (model.PrintMode == 1)
|
{
|
model.PrintModeName = "合版";
|
}
|
else
|
{
|
model.PrintModeName = "专版";
|
}
|
PaperSizeDetailBLL _paperSizeDetailBLL = new PaperSizeDetailBLL();
|
|
|
model.PrintTypeName = new SysInquiry_PrintingTypeBLL().GetModelById(model.PrintTypeId).PrintName;
|
string printDemand = string.Empty;
|
//名片
|
if (model.PrintTypeId == 13)
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
model.PrintCount = printCountByBox;
|
model.PrintSizeName = paperSize.Name;
|
model.PrintCountName = model.PrintBoxNumber.ToString() + "款,每款" + model.PrintCount.ToString() + "盒数";
|
printDemand += paperSize.Name + "," + model.PaperMP + "," + model.SingleOrdouble;
|
|
}
|
else if (model.PrintTypeId == 14) //DM单
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand = 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.PrintSizeName = paperSize.Name;
|
}
|
else if (model.PrintTypeId == 31) //广告纸杯
|
{
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CupType);
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += typeModel.TypeNmae + "," + model.PaperMP + "," + 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.PrintCountName = model.PrintCount.ToString();
|
MultipleTypeInfoBLL _multipleTypeInfoBLL = new MultipleTypeInfoBLL();
|
SysInquiry_MultipleTypeInfo typeModel = _multipleTypeInfoBLL.GetModel(model.CupType);
|
printDemand += typeModel.TypeNmae + ",";
|
typeModel = _multipleTypeInfoBLL.GetModel(model.SJType);
|
printDemand += typeModel.TypeNmae + "," + 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) //黑白印件
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand = 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.PrintSizeName = paperSize.Name;
|
}
|
else if (model.PrintTypeId == 22) //便签
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
printDemand += "每本" + model.PageNum.ToString() + "页,";
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
if (model.PrintMode == 1)
|
{
|
printDemand += paperSize.Name + ",";
|
printDemand += model.PaperMP;
|
}
|
else
|
{
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
printDemand += paperSize.Name + ",";
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperMP.ToInt32().Value);
|
printDemand += paperInfo.PaperName;
|
}
|
model.PrintSizeName = paperSize.Name;
|
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 + "克";
|
}
|
printDemand += "," + model.PrintColor;
|
}
|
else if (model.PrintTypeId == 26) //封套
|
{
|
model.PrintCountName = model.PrintCount.ToString();
|
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>();
|
}
|
model.AfterWorkList.Add(19);//粘手提袋必选
|
model.PrintCountName = model.PrintCount.ToString();
|
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();
|
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卡
|
{
|
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) //报纸
|
{
|
SysInquiry_PaperSizeDetail paperSize = _paperSizeDetailBLL.GetPaperSizeDetail(model.PrintTypeId, model.PrintSizeId);
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
model.PrintCountName = model.PrintCount.ToString();
|
SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
|
printDemand = paperSize.Name + ",";
|
model.PrintSizeName = paperSize.Name;
|
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 + "克";
|
}
|
|
}
|
model.PrintDemand = printDemand;
|
if (model.PrintTypeId == 21 && model.PrintMode == 1)
|
{
|
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;
|
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;
|
foreach (int workId in model.AfterWorkList)
|
{
|
SysInquiry_AfterParameterInfo afterInfo = _afterParameterInfoBLL.GetModel(workId);
|
if (printTypeId != 13 && printTypeId != 33)
|
{
|
if (afterInfo.ParameterName == "烫金")
|
{
|
afterInfo.ParameterName = "烫金(" + 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 + ")";
|
}
|
}
|
if (afterInfo.ParameterName == "胶头")
|
{
|
afterInfo.ParameterName = "胶头(每本" + model.PageNum.ToString() + "页)";
|
}
|
afterWorkStr += afterInfo.ParameterName + ",";
|
}
|
if (!string.IsNullOrEmpty(afterWorkStr))
|
{
|
afterWorkStr = afterWorkStr.Substring(0, afterWorkStr.Length - 1);
|
}
|
//if (model.PrintTypeId == 16)
|
//{
|
// afterWorkStr += "," + model.RopeTypeName + "(" + model.RopeColor + ")";
|
//}
|
return afterWorkStr;
|
}
|
|
#endregion
|
|
#region 事件
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
BussinessID = CurrentWeb().MemberId;
|
this.Title += "-" + CurrentWeb().Name;
|
if (!IsPostBack)
|
{
|
SetPrintName();
|
|
}
|
|
string result = string.Empty;
|
|
if (Request["PaperInit"] != null)
|
{
|
int printTypeId = Session["PrintTypeId"].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 = Session["PrintTypeId"].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 = Session["PrintTypeId"].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 = Session["PrintTypeId"].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["sumit"] != null)
|
{
|
int pageIndex = 1;
|
int pageSize = 5;
|
if (Request["hidPageIndex"] != null)
|
pageIndex = Request["hidPageIndex"].ToString().ToInt32().Value;
|
InquiryCommonModel model = GetInquiryCommonModel();
|
string xmlStr = InquiryBLL.GetInquiryCommonModelXMLStr(model);
|
xmlStr = SerializationHelper.EncryptDES(xmlStr, "ssssssss");
|
Utils.WriteCookie("InquiryRecord", xmlStr);
|
InquiryBLL _inquiryBLL = new InquiryBLL();
|
int pageCount = 0;
|
Guid memberId;
|
if (Request["memberId"] != null)
|
{
|
memberId = Request["memberId"].ToGuid2();
|
}
|
else
|
{
|
memberId = Guid.Empty;
|
}
|
|
|
IList<InquiryResultModel> inquiryResultList = _inquiryBLL.GetInquiryResultByCommonList(model, memberId,-1,string.Empty,"","","",pageIndex, pageSize, ref pageCount);
|
string jsonStr = JsonHelper.GetJsonStringByObject(inquiryResultList);
|
result = "{ pageCount:" + pageCount + ",inquiryList:" + jsonStr + "}";
|
Response.Write(result);
|
Response.End();
|
}
|
}
|
#endregion
|
}
|
}
|