| | |
| | | Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();//字典业务逻辑操作类对象 |
| | | public int ContractCount = 0; |
| | | public string BuyerId = ""; |
| | | OA_StaffBLL bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | public int neiyeshu = 1; |
| | | /// <summary> |
| | | /// 页面加载事件 |
| | | /// </summary> |
| | |
| | | return false; |
| | | } |
| | | |
| | | EC_OrderBasic _eC_OrderBasic = _eC_OrderBasicBLL.SelectModelById(orderId.Value); |
| | | if (null == _eC_OrderBasic) |
| | | EC_OrderBasic eC_OrderBasic = _eC_OrderBasicBLL.SelectModelById(orderId.Value); |
| | | if (null == eC_OrderBasic) |
| | | { |
| | | CY.WebForm.BasePage.JavaScript.MessageBox("数据不存在!", this); |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | _eC_AcceptWayByOrder.NumPerBag = _eC_OrderBasic.OrderExtend.NumPerBag; |
| | | _eC_AcceptWayByOrder.BagNum = _eC_OrderBasic.OrderExtend.BagNum; |
| | | if (eC_OrderBasic.OrderExtend.NumPerBag == "NaN") |
| | | { |
| | | eC_OrderBasic.OrderExtend.NumPerBag = ""; |
| | | } |
| | | if (eC_OrderBasic.OrderExtend.BagNum == "NaN") |
| | | { |
| | | eC_OrderBasic.OrderExtend.BagNum = ""; |
| | | } |
| | | |
| | | _eC_AcceptWayByOrder.NumPerBag = eC_OrderBasic.OrderExtend.NumPerBag; |
| | | _eC_AcceptWayByOrder.BagNum = eC_OrderBasic.OrderExtend.BagNum; |
| | | |
| | | EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL(); |
| | | EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderId.Value); |
| | |
| | | var sys_Dictionarie = _sys_DictionaryBLL.GetDataByType("印刷单位").FirstOrDefault(x=>x.MeanValue == _inquiryCommonModel.Unit); |
| | | if (sys_Dictionarie != null) |
| | | { |
| | | _eC_OrderBasic.UnitName = sys_Dictionarie.Name; |
| | | eC_OrderBasic.UnitName = sys_Dictionarie.Name; |
| | | } |
| | | BuyerId = _eC_OrderBasic.BuyerId.ToString(); |
| | | BuyerId = eC_OrderBasic.BuyerId.ToString(); |
| | | //查询客户是否有合同 |
| | | Database DC = new Database(); |
| | | try |
| | | { |
| | | |
| | | string sqlStr = string.Format("select count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", _eC_OrderBasic.BuyerId); |
| | | string sqlStr = string.Format("select count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", eC_OrderBasic.BuyerId); |
| | | SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection); |
| | | ContractCount = (int)myCmd.ExecuteScalar(); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | rptOrder.DataSource = new List<EC_OrderBasic>() { _eC_OrderBasic }; |
| | | |
| | | if (eC_OrderBasic.BusinessManagerId.HasValue && eC_OrderBasic.BusinessManagerId.Value > 0) |
| | | { |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(eC_OrderBasic.BusinessManagerId); |
| | | if (oA_Staff != null) |
| | | { |
| | | eC_OrderBasic.BusinessManager = oA_Staff.Name; |
| | | } |
| | | } |
| | | // PageAllMoney +=( eC_OrderBasic.ShejiSumPrice.Value + eC_OrderBasic.ShejiSumPriceneiye.Value); |
| | | if (eC_OrderBasic.ShejiSumPrice.HasValue && eC_OrderBasic.ShejiSumPrice.Value > 0) |
| | | { |
| | | eC_OrderBasic.Shejiticheng = eC_OrderBasic.ShejirenyuanName + eC_OrderBasic.Shejicount + "*" + (eC_OrderBasic.ShejiUnitPrice.HasValue ? eC_OrderBasic.ShejiUnitPrice.Value.ToString("G29") : "0") + "=" + (eC_OrderBasic.ShejiSumPrice.HasValue ? eC_OrderBasic.ShejiSumPrice.Value.ToString("G29") : "0"); |
| | | } |
| | | |
| | | if (eC_OrderBasic.PrintTypeId == 15 || eC_OrderBasic.PrintTypeId == 38) |
| | | { |
| | | if (eC_OrderBasic.ShejiSumPriceneiye.HasValue && eC_OrderBasic.ShejiSumPriceneiye.Value > 0) |
| | | { |
| | | eC_OrderBasic.Shejiticheng += "<br/> " + eC_OrderBasic.ShejirenyuanNameneiye + eC_OrderBasic.Shejicountneiye + "*" + (eC_OrderBasic.ShejiUnitPriceneiye.HasValue ? eC_OrderBasic.ShejiUnitPriceneiye.Value.ToString("G29") : "0") + "=" + (eC_OrderBasic.ShejiSumPriceneiye.HasValue ? eC_OrderBasic.ShejiSumPriceneiye.Value.ToString("G29") : "0"); |
| | | } |
| | | |
| | | } |
| | | eC_OrderBasic.Shejicountneiyename = (eC_OrderBasic.Shejicountneiye.HasValue && eC_OrderBasic.Shejicountneiye.Value > 0) ? eC_OrderBasic.Shejicountneiye.Value.ToString() : ""; |
| | | if (eC_OrderBasic.PrintTypeId == 6) |
| | | { |
| | | if (eC_OrderBasic.ShejiSumPriceneiye.HasValue && eC_OrderBasic.ShejiSumPriceneiye.Value > 0) |
| | | { |
| | | eC_OrderBasic.Shejiticheng += "<br/> " + eC_OrderBasic.ShejirenyuanNameneiye + eC_OrderBasic.Shejicountneiye + "*" + (eC_OrderBasic.ShejiUnitPriceneiye.HasValue ? eC_OrderBasic.ShejiUnitPriceneiye.Value.ToString("G29") : "0") + "=" + (eC_OrderBasic.ShejiSumPriceneiye.HasValue ? eC_OrderBasic.ShejiSumPriceneiye.Value.ToString("G29") : "0"); |
| | | } |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(eC_OrderBasic.ShejileixingNameneiye1)) |
| | | { |
| | | if (eC_OrderBasic.ShejiSumPriceneiye1.HasValue && eC_OrderBasic.ShejiSumPriceneiye1.Value > 0) |
| | | { |
| | | eC_OrderBasic.Shejiticheng += "<br/> " + eC_OrderBasic.ShejirenyuanNameneiye1 + eC_OrderBasic.Shejicountneiye1 + "*" + (eC_OrderBasic.ShejiUnitPriceneiye1.HasValue ? eC_OrderBasic.ShejiUnitPriceneiye1.Value.ToString("G29") : "0") + "=" + (eC_OrderBasic.ShejiSumPriceneiye1.HasValue ? eC_OrderBasic.ShejiSumPriceneiye1.Value.ToString("G29") : "0"); |
| | | } |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty(eC_OrderBasic.ShejileixingNameneiye2)) |
| | | { |
| | | if (eC_OrderBasic.ShejiSumPriceneiye2.HasValue && eC_OrderBasic.ShejiSumPriceneiye2.Value > 0) |
| | | { |
| | | eC_OrderBasic.Shejiticheng += "<br/> " + eC_OrderBasic.ShejirenyuanNameneiye2 + eC_OrderBasic.Shejicountneiye2 + "*" + (eC_OrderBasic.ShejiUnitPriceneiye2.HasValue ? eC_OrderBasic.ShejiUnitPriceneiye2.Value.ToString("G29") : "0") + "=" + (eC_OrderBasic.ShejiSumPriceneiye2.HasValue ? eC_OrderBasic.ShejiSumPriceneiye2.Value.ToString("G29") : "0"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | int Shejicountneiyecount = 0; |
| | | if (eC_OrderBasic.Shejicountneiye.HasValue) |
| | | { |
| | | Shejicountneiyecount += eC_OrderBasic.Shejicountneiye.Value; |
| | | } |
| | | if (eC_OrderBasic.Shejicountneiye1.HasValue) |
| | | { |
| | | Shejicountneiyecount += eC_OrderBasic.Shejicountneiye1.Value; |
| | | } |
| | | if (eC_OrderBasic.Shejicountneiye2.HasValue) |
| | | { |
| | | Shejicountneiyecount += eC_OrderBasic.Shejicountneiye2.Value; |
| | | } |
| | | |
| | | eC_OrderBasic.Shejicountneiyename = Shejicountneiyecount.ToString(); |
| | | } |
| | | |
| | | |
| | | if(eC_OrderBasic.PrintTypeId == 6) |
| | | { |
| | | if (_inquiryCommonModel.InquiryInsideList != null) |
| | | { |
| | | neiyeshu = _inquiryCommonModel.InquiryInsideList.Count; |
| | | } |
| | | } |
| | | |
| | | |
| | | rptOrder.DataSource = new List<EC_OrderBasic>() { eC_OrderBasic }; |
| | | rptOrder.DataBind(); |
| | | rptAccpteWay.DataSource = "自提".Equals(_inquiryCommonModel.DeliveryModeName) ? null : new List<EC_AcceptWayByOrder>() { _eC_AcceptWayByOrder }; |
| | | rptAccpteWay.DataBind(); |
| | | rptInquiryCommon.DataSource = new List<InquiryCommonModel>() { _inquiryCommonModel }; |
| | | rptInquiryCommon.DataBind(); |
| | | |
| | | this.lblRemark.Text = _eC_OrderBasic.Remark; |
| | | this.lblPrintPackDeliveryRequir.Text = _eC_OrderBasic.PrintPackDeliveryRequir; |
| | | this.lblRemark.Text = eC_OrderBasic.Remark; |
| | | this.lblPrintPackDeliveryRequir.Text = eC_OrderBasic.PrintPackDeliveryRequir; |
| | | return true; |
| | | } |
| | | |