/** * DeliverWorkBookPrintDetail.aspx.cs * * 功 能: 订单详情 * 类 名: DeliverWorkBookPrintDetail * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-24 13:25 吴崎均 初版 * V0.02 2013-5-15 18:23 吴崎均 编辑界面样式 * V0.03 2013-5-15 15:58 吴崎均 完成数据获取 * V0.04 2013-5-21 14:38 吴崎均 增加订单进度 * V0.05 2013-5-23 9:33 吴崎均 修改继承类为默认类Page使显示信息不受登录控制 * * * * * * */ using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.BLL.EC; using CY.Infrastructure.Common; using CY.Model; using CY.BLL; using CY.Model.Inquiry; using CY.BLL.Sys; namespace CY.WebForm.Pages.business { /// /// 订单详情 /// public partial class DeliverWorkBookPrintDetail : BasePage { CoreCmsPlanOrderBLL bll_CoreCmsPlanOrderBLL = null; CoreCmsPlanOrderItemBLL bll_CoreCmsPlanOrderItemBLL = null; EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = null; EC_OrderBasicBLL _eC_OrderBasicBLL = null; public int orderkeyid = 0; public string biaotou = ""; public string orderName = ""; public int countss = 0; //初始化 public DeliverWorkBookPrintDetail() { bll_CoreCmsPlanOrderBLL = new CoreCmsPlanOrderBLL(); bll_CoreCmsPlanOrderItemBLL = new CoreCmsPlanOrderItemBLL(); _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL(); _eC_OrderBasicBLL = new EC_OrderBasicBLL(); } /// /// 页面加载事件 /// /// /// protected void Page_Load(object sender, EventArgs e) { try { switch (Request["Target"]) { case "GetCommunication": break; default: Page_Load_Default(); return; } } catch (Exception ex) { PAGEHandleException(ex); Response.Clear(); Response.Write("-1"); } Response.End(); } /// /// 默认加载事件方法 /// private void Page_Load_Default() { LoadOrderInfo(); } /// /// 加载订单信息 /// private bool LoadOrderInfo() { //如果是批量打印 string orderIdStr = Request["orderId"]; //如果是只打印一张 string PlanOrderidStr = Request["PlanOrderid"]; var coreCmsPlanOrders = new List(); if (!string.IsNullOrEmpty(orderIdStr)) { orderIdStr = orderIdStr.Substring(1); this.hideOrderId.Value = orderIdStr; var ssss = bll_CoreCmsPlanOrderBLL.GetModelByids(orderIdStr); coreCmsPlanOrders = ssss.ToList(); orderkeyid = coreCmsPlanOrders[0].orderkeyid.Value; } else if (!string.IsNullOrEmpty(PlanOrderidStr)) { var aaaa = bll_CoreCmsPlanOrderBLL.GetModelByKeyid(PlanOrderidStr.ToInt32().Value); coreCmsPlanOrders.Add(aaaa); orderkeyid = aaaa.orderkeyid.Value; } else { CY.WebForm.BasePage.JavaScript.MessageBox("数据不存在!", this); return false; } //订单主单 var eC_OrderBasic = _eC_OrderBasicBLL.SelectModelById(orderkeyid); orderName = eC_OrderBasic.DocumentName + "送货单"; //订单明细 EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderkeyid); InquiryCommonModel _inquiryCommonModel = null; if (null == _eC_OrderPrintParameter) { _inquiryCommonModel = new InquiryCommonModel(); } else { _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel; } var inquiryWorkBookModels = _inquiryCommonModel.InquiryWorkBookList.OrderBy(x => x.WorkBookNameTxt).ThenBy(x => x.WorkBookSizeTxt); if (string.IsNullOrEmpty(biaotou)) { int i = 1; biaotou = ""; foreach (var inquiryWorkBookModel in inquiryWorkBookModels) { biaotou += " "; if (i%8==0) { biaotou += " ";// } if (i % 8 == 0 && i != inquiryWorkBookModels.Count()) { biaotou += " "; } if (i == inquiryWorkBookModels.Count()&& i % 8 != 0) { for (int j=0;j<8;j++) { biaotou += " "; i = i + 1; if (i % 8 == 0) { biaotou += " ";// break; } } } i++; } biaotou += " "; biaotou += "
" + inquiryWorkBookModel.WorkBookSizeTxt + inquiryWorkBookModel.WorkBookNameTxt + "
验收意见 产品质量:非常满意 满意一般不满意
配送服务:非常满意 满意一般不满意
其他意见:
"; } countss = coreCmsPlanOrders.Count; rptOrder.DataSource = coreCmsPlanOrders; rptOrder.DataBind(); return true; } } }