From df86a965f286dae149d7d3d2d3e886b3c2e4ee0b Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 20 二月 2025 09:40:55 +0800
Subject: [PATCH] 公文纸“A4(420*297”改为“A3(420*297”
---
CY_ECommercePlatform/CY.WebForm/Pages/front/InquiryOnLine.aspx.cs | 138 ++++++++++++++++++++++++++++++++++++---------
1 files changed, 110 insertions(+), 28 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/front/InquiryOnLine.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/front/InquiryOnLine.aspx.cs
index 5366de6..ac1b301 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/front/InquiryOnLine.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/front/InquiryOnLine.aspx.cs
@@ -102,6 +102,7 @@
string works = string.Empty;
int printMode = 1;
int gramWeight = -1;
+ string Qitazhi = string.Empty;
int brandId = -1;
int printCount = -1;
string singleOrdouble = string.Empty;
@@ -153,11 +154,16 @@
{
paperId = 3;
}
+ if (request["Qitazhi0"] != null)
+ {
+ Qitazhi = request["Qitazhi0"];
+ }
+
if (request["gramWeight0"] != null)
- gramWeight = request["gramWeight0"].ToString().ToInt32().Value;
+ gramWeight = request["gramWeight0"].ToInt32().HasValue? request["gramWeight0"].ToInt32().Value:0;
if (request["brand0"] != null)
{
- brandId = request["brand0"].ToString().ToInt32().Value;
+ brandId = request["brand0"].ToInt32().HasValue ?request["brand0"].ToString().ToInt32().Value : 0;
}
if (request["printCount"] != null)
printCount = request["printCount"].ToString().ToInt32().Value;
@@ -239,6 +245,7 @@
model.PaperId = paperId;
model.GramWeight = gramWeight;
model.BrandId = brandId;
+ model.Qitazhi = Qitazhi;
model.PrintCount = printCount;
model.Unit = ysuint;
model.SingleOrdouble = singleOrdouble;
@@ -352,9 +359,9 @@
insideModel.PaperId = 3;
insideModel.PrintColor = "鍥涜壊鍗板埛";
if (request["pageNum1"] != null)
- insideModel.PageNum = request["pageNum1"].ToString().ToInt32().Value;
+ insideModel.PageNum = request["pageNum1"].ToInt32().HasValue ? request["pageNum1"].ToString().ToInt32().Value : 0;
if (request["gramWeight1"] != null)
- insideModel.GramWeight = request["gramWeight1"].ToString().ToInt32().Value;
+ insideModel.GramWeight = request["gramWeight1"].ToInt32().HasValue? request["gramWeight1"].ToString().ToInt32().Value:0;
model.InquiryInsideList.Add(insideModel);
printDemand += paperSize.Name + "锛岄獞椹";
printDemand += "锛屽皝闈㈣姹傦細閾滅増绾革紝" + model.GramWeight + "鍏嬶紝" + model.PrintColor + "锛�4椤�";
@@ -401,13 +408,15 @@
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
}
if (request["brand" + i] != null)
- insideModel.BrandId = request["brand" + i].ToString().ToInt32().Value;
+ insideModel.BrandId = request["brand" + i].ToInt32().HasValue ? request["brand" + i].ToString().ToInt32().Value:0;
if (request["gramWeight" + i] != null)
- insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
+ insideModel.GramWeight = request["gramWeight" + i].ToInt32().HasValue ? request["gramWeight" + i].ToString().ToInt32().Value:0;
+ if (request["Qitazhi" + i] != null)
+ insideModel.Qitazhi = request["Qitazhi" + i];
if (request["printColor" + i] != null)
insideModel.PrintColor = request["printColor" + i].ToString();
if (request["pageNum" + i] != null)
- insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
+ insideModel.PageNum = request["pageNum" + i].ToInt32().HasValue? request["pageNum" + i].ToInt32().Value:0;
if (request["works" + i] != null)
works = request["works" + i].ToString();
if (!string.IsNullOrEmpty(works))
@@ -437,14 +446,25 @@
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 + "";
+ PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
+ SysInquiry_PaperInfo paperInfo = null;
+ if (model.PaperId >= 0)
+ {
+ paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
+ printDemand += "锛屽皝闈㈣姹傦細" + paperInfo.PaperName + "";
+ }
+ else
+ {
+ printDemand += "锛屽皝闈㈣姹傦細" + model.Qitazhi + "";
+ }
+
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
- if (model.PaperId != 0)
+ if (model.PaperId > 0)
{
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
printDemand += "(" + brandInfo.BrandName + ")";
@@ -455,16 +475,24 @@
foreach (InquiryInsideModel insideModelObj in model.InquiryInsideList)
{
printDemand += "鍐呴〉" + insideModelObj.InsideIndex.ToString() + "锛�";
- paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
- printDemand += paperInfo.PaperName;
- if (insideModelObj.PaperId != 0)
+ if(insideModelObj.PaperId >= 0)
+ {
+ paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
+ printDemand += paperInfo.PaperName;
+ }
+ else
+ {
+ printDemand += insideModelObj.Qitazhi;
+ }
+
+ 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 == "纭吀绾�")
+ if (insideModelObj.PaperId >= 0 && paperInfo.PaperName == "纭吀绾�")
{
printDemand += "寮�";
}
@@ -527,13 +555,15 @@
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
}
if (request["brand" + i] != null)
- insideModel.BrandId = request["brand" + i].ToString().ToInt32().Value;
+ insideModel.BrandId = request["brand" + i].ToInt32().HasValue ? request["brand" + i].ToString().ToInt32().Value:0;
if (request["gramWeight" + i] != null)
- insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
+ insideModel.GramWeight = request["gramWeight" + i].ToInt32().HasValue? request["gramWeight" + i].ToString().ToInt32().Value:0;
+ if (request["Qitazhi" + i] != null)
+ insideModel.Qitazhi = request["Qitazhi" + i];
if (request["printColor" + i] != null)
insideModel.PrintColor = request["printColor" + i].ToString();
if (request["pageNum" + i] != null)
- insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
+ insideModel.PageNum = request["pageNum" + i].ToInt32().HasValue ? request["pageNum" + i].ToString().ToInt32().Value:0;
if (request["works" + i] != null)
works = request["works" + i].ToString();
if (!string.IsNullOrEmpty(works))
@@ -564,13 +594,21 @@
model.InquiryInsideList.Add(insideModel);
}
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
- SysInquiry_PaperInfo paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
+ SysInquiry_PaperInfo paperInfo = null;
AfterParameterInfoBLL _afterParameterInfoBLL = new AfterParameterInfoBLL();
SysInquiry_AfterParameterInfo bindingModeObj = _afterParameterInfoBLL.GetModel(model.BindingMode);
printDemand += model.PrintSizeName + "锛�" + bindingModeObj.ParameterName;
- printDemand += "锛屽皝闈㈣姹傦細" + paperInfo.PaperName + "";
+ if(model.PaperId >= 0)
+ {
+ paperInfo = _paperInfoBLL.GetPaperModel(model.PaperId);
+ printDemand += "锛屽皝闈㈣姹傦細" + paperInfo.PaperName + "";
+ }
+ else
+ {
+ printDemand += "锛屽皝闈㈣姹傦細" + model.Qitazhi + "";
+ }
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
- if (model.PaperId != 0)
+ if (model.PaperId > 0)
{
SysInquiry_BrandInfo brandInfo = _brandInfoBLL.SelectModelByKey(model.BrandId);
printDemand += "(" + brandInfo.BrandName + ")";
@@ -581,16 +619,24 @@
foreach (InquiryInsideModel insideModelObj in model.InquiryInsideList)
{
printDemand += "鍐呴〉" + insideModelObj.InsideIndex.ToString() + "锛�";
- paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
- printDemand += paperInfo.PaperName;
- if (insideModelObj.PaperId != 0)
+
+ if (insideModelObj.PaperId >= 0)
+ {
+ paperInfo = _paperInfoBLL.GetPaperModel(insideModelObj.PaperId);
+ printDemand += paperInfo.PaperName;
+ }
+ else
+ {
+ printDemand += insideModelObj.Qitazhi;
+ }
+ 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 == "纭吀绾�")
+ if (insideModelObj.PaperId >= 0 && paperInfo.PaperName == "纭吀绾�")
{
printDemand += "寮�";
}
@@ -1630,6 +1676,10 @@
printDemand += "锛�" + model.GramWeight + "鍏�";
}
printDemand += "锛�" + model.SingleOrdouble + "锛�" + model.PrintColor;
+ if (request["jtWZ"] != null)
+ model.JTWZ = request["jtWZ"].ToString();
+ if (request["jtWZFM"] != null)
+ model.jtWZFM = request["jtWZFM"].ToString();
}
else if (model.PrintTypeId == 39) //鍏枃绾�
{
@@ -1869,6 +1919,8 @@
}
if (request["jtWZ"] != null)
model.JTWZ = request["jtWZ"].ToString();
+ if (request["jtWZFM"] != null)
+ model.jtWZFM = request["jtWZFM"].ToString();
if (request["frontType"] != null)
model.FrontType = request["frontType"].ToString();
if (request["pDemand"] != null)
@@ -2159,11 +2211,11 @@
insideModel.PaperId = request["paper" + i].ToString().ToInt32().Value;
}
if (request["gramWeight" + i] != null)
- insideModel.GramWeight = request["gramWeight" + i].ToString().ToInt32().Value;
+ insideModel.GramWeight = request["gramWeight" + i].ToInt32().HasValue? request["gramWeight" + i].ToString().ToInt32().Value:0;
if (request["printColor" + i] != null)
insideModel.PrintColor = request["printColor" + i].ToString();
if (request["pageNum" + i] != null)
- insideModel.PageNum = request["pageNum" + i].ToString().ToInt32().Value;
+ insideModel.PageNum = request["pageNum" + i].ToInt32().HasValue ? request["pageNum" + i].ToString().ToInt32().Value : 0; ;
if (request["works" + i] != null)
works = request["works" + i].ToString();
if (!string.IsNullOrEmpty(works))
@@ -2460,8 +2512,13 @@
{
if (!string.IsNullOrEmpty(model.JTWZ))
{
- afterWorkStr = model.JTWZ ;
+ afterWorkStr = /*"瑁呰锛�" +*/ model.JTWZ ;
+ if (model.JTWZ != "鑳跺ご" && model.JTWZ != "鑳跺乏" && model.JTWZ != "鍏朵粬")
+ {
+ afterWorkStr += "锛屽皝闈㈠嵃鍒疯姹傦細" + model.jtWZFM;
+ }
}
+
if(!string.IsNullOrEmpty(model.ThStart) || !string.IsNullOrEmpty(model.ThEnd))
{
afterWorkStr += "锛屽鍙峰彿娈�(" + model.ThStart + "-" + model.ThEnd + ")";
@@ -2469,6 +2526,31 @@
}
}
+ if (model.PrintTypeId == 29)
+ {
+ if (!string.IsNullOrEmpty(model.JTWZ))
+ {
+ if (!string.IsNullOrEmpty(afterWorkStr))
+ {
+ afterWorkStr += "锛�";
+ }
+ afterWorkStr += /*"瑁呰锛�" +*/ model.JTWZ;
+ if (model.JTWZ != "鑳跺ご" && model.JTWZ != "鑳跺乏" && model.JTWZ != "鍏朵粬" && model.JTWZ != "鏁i〉")
+ {
+ if (!string.IsNullOrEmpty(model.jtWZFM))
+ afterWorkStr += "锛屽皝闈㈠嵃鍒疯姹傦細" + model.jtWZFM;
+ }
+ if ( model.JTWZ != "鏁i〉" && model.PageNum > 0)
+ afterWorkStr += "(姣忔湰" + model.PageNum.ToString() + "寮�)";
+ }
+
+ //if (!string.IsNullOrEmpty(model.ThStart) || !string.IsNullOrEmpty(model.ThEnd))
+ //{
+ // afterWorkStr += "锛屽鍙峰彿娈�(" + model.ThStart + "-" + model.ThEnd + ")";
+ // //afterWorkStr += "锛�" + model.JTWZ;
+ //}
+ }
+
if (model.PrintTypeId == 25)
{
--
Gitblit v1.9.1