private void BindData(IList <Model.PronoteHeader> list) { foreach (Model.PronoteHeader detail in list) { if (!string.IsNullOrEmpty(detail.InvoiceXOId)) { detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId); } detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId); if (!string.IsNullOrEmpty(detail.ProductId)) { detail.Product = new BL.ProductManager().Get(detail.ProductId); if (string.IsNullOrEmpty(detail.CustomerProductName)) { detail.CustomerProductName = new Help().GetCustomerProductNameByPronoteHeaderId(detail.PronoteHeaderID, detail.ProductId); } Model.ProductMark mark = productMarkManager.SelectByProductId(detail.ProductId); if (mark != null) { detail.MainMark = mark.MainMark; detail.SideMark = mark.SideMark; } } } this.DataSource = list; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString(); this.xrLabelPronoteHeaderID.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteHeaderID); this.xrLabelPronoteDte.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteDate, "{0:yyyy-MM-dd}"); this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_CustomerInvoiceXOId); this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "CustomerShortName"); this.xrLabelCheckedStandard.DataBindings.Add("Text", this.DataSource, "CustomerCheckStandard"); this.xrLabelCustomerProductName.DataBindings.Add("Text", this.DataSource, "CustomerProductName"); this.xrLabelCount.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_DetailsSum); this.xrLabelUnit.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_ProductUnit); this.xrLabelXOJHDate.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy-MM-dd}"); this.xrLabelPiHao.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_CustomerLotNumber); //this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductName"); this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductNameWithVersion"); this.xrRichTextProDesc.DataBindings.Add("Rtf", this.DataSource, "ProductDesc"); this.xrLabelMRP.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_MRSHeaderId); this.xrLabelWorkHouse.DataBindings.Add("Text", this.DataSource, "Workhousename"); this.xrLabelBeforepPackage.DataBindings.Add("Text", this.DataSource, "MRSDetails.BeforePackageProduct." + Model.Product.PRO_ProductName); this.xrLabel14.DataBindings.Add("Text", this.DataSource, "AuditEmpName"); this.GroupHeader1.GroupFields.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID)); // this.GroupFooter1.gr.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID)); this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Pronotedesc); this.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee0Name"); this.lbl_MaterialSum.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Materialprocessum); //商品正侧唛单独划分出一张表 2021年7月18日20:28:12 //this.RichTextZhengMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrZhengMai); //this.RichTextCeMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrCeMai); this.RichTextZhengMai.DataBindings.Add("Rtf", this.DataSource, "MainMark"); this.RichTextCeMai.DataBindings.Add("Rtf", this.DataSource, "SideMark"); this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); this.lbl_JIS.DataBindings.Add("Text", this.DataSource, "Lbl_JIS"); }
private void BindData(IList <Model.PronoteHeader> list, int sourcetype) { foreach (Model.PronoteHeader detail in list) { if (!string.IsNullOrEmpty(detail.InvoiceXOId)) { detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId); } //detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId); //if (detail.MRSDetails != null) // detail.Plannum = detail.MRSDetails.MRSdetailsQuantity; if (!string.IsNullOrEmpty(detail.ProductId)) { detail.Product = new BL.ProductManager().Get(detail.ProductId); if (string.IsNullOrEmpty(detail.CustomerProductName)) { detail.CustomerProductName = CommonHelp.GetCustomerProductNameByPronoteHeaderId(detail, detail.ProductId, detail.HandbookProductId); } Model.ProductMark mark = productMarkManager.SelectByProductId(detail.ProductId); if (mark != null) { detail.MainMark = mark.MainMark; detail.SideMark = mark.SideMark; } } } this.DataSource = list; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; if (sourcetype == 5) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (sourcetype == 4) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; } this.lblHandBookId.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_HandbookId); this.lblHandBookProducrId.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_HandbookProductId); this.lblPlanNum.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_InvoiceXODetailQuantity); //Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get((this.GetCurrentRow() as Model.PronoteHeader).MRSdetailsId); //if (mrsdetail != null) // this.lblPlanNum.Text = mrsdetail.MRSdetailsQuantity.ToString(); this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString(); this.xrLabelPronoteHeaderID.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteHeaderID); this.xrLabelPronoteDte.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteDate, "{0:yyyy-MM-dd}"); //this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_InvoiceCusId); this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_CustomerInvoiceXOId); this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "CustomerShortName"); this.xrLabelCheckedStandard.DataBindings.Add("Text", this.DataSource, "CustomerCheckStandard"); this.xrLabelCustomerProductName.DataBindings.Add("Text", this.DataSource, "CustomerProductName"); this.xrLabelCount.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_DetailsSum); this.xrLabelUnit.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_ProductUnit); this.xrLabelXOJHDate.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy-MM-dd}"); this.xrLabelPiHao.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_CustomerLotNumber); this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductName"); this.xrRichTextProDesc.DataBindings.Add("Rtf", this.DataSource, "ProductDesc"); this.xrLabelMRP.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_MRSHeaderId); this.xrLabelWorkHouse.DataBindings.Add("Text", this.DataSource, "Workhousename"); this.xrLabelBeforepPackage.DataBindings.Add("Text", this.DataSource, "MRSDetails.BeforePackageProduct." + Model.Product.PRO_ProductName); this.GroupHeader1.GroupFields.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID)); // this.GroupFooter1.gr.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID)); this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Pronotedesc); this.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee0Name"); //商品正侧唛单独划分出一张表 2021年8月22日23:02:39 //this.RichTextZhengMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrZhengMai); //this.RichTextCeMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrCeMai); this.RichTextZhengMai.DataBindings.Add("Rtf", this.DataSource, "MainMark"); this.RichTextCeMai.DataBindings.Add("Rtf", this.DataSource, "SideMark"); this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); }