private void GetDetailInfo() { Model.PackingInvoiceHeader model = this.bindingSourceHeader.Current as Model.PackingInvoiceHeader; if (model != null) { model.Details = detailManager.SelectByHeader(model.InvoiceNo); if (model.Details != null && model.Details.Count > 0) { string currency = new BL.InvoiceXOManager().GetCurrencyByInvoiceId(model.Details[0].InvoiceXODetail.InvoiceId); string currencyENName = Model.ExchangeRate.GetCurrencyENName(currency); string currencySign = Model.ExchangeRate.GetCurrencySign(currency); //model.Currency = currencySign; foreach (var detail in model.Details) { detail.Currency = currencySign; } } this.bindingSourceDetail.DataSource = model.Details; } else { this.bindingSourceDetail.DataSource = null; } this.gridControl3.RefreshDataSource(); this.SelectItem = model; }
//加工单 private void btnGetPronoteHeader_Click(object sender, EventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(this.nccWorkHouse.EditValue as Model.WorkHouse, 0); if (pronoForm.ShowDialog(this) == DialogResult.OK) { //this._pcpgoc.Details.Clear(); foreach (var SelectModel in PronoteHeader.ChoosePronoteHeaderDetailsForm._pronoteHeaderList) { if (SelectModel != null) { this._pcpgoc.PCPGOnlineCheckType = -1; Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(SelectModel.InvoiceXOId); if (xo != null) { this._pcpgoc.InvoiceCusXOId = xo.CustomerInvoiceXOId; //this._pcpgoc.FromPCId = SelectModel.PronoteHeaderID; if (SelectModel.InvoiceXOId != null) { this._pcpgoc.Customer = xo.xocustomer; } } //this._pcpgoc.CustomerId = this._pcpgoc.Customer == null ? "" : this._pcpgoc.CustomerId; //this._pcpgoc.Product = new BL.ProductManager().Get(SelectModel.ProductId); //this._pcpgoc.ProductId = SelectModel.ProductId; //this._pcpgoc.InvoiceXOQuantity = SelectModel.InvoiceXODetailQuantity; //Controls this.txtInvoiceCusXOId.Text = this._pcpgoc.InvoiceCusXOId; //this.nccCHCustomer.EditValue = this._pcpgoc.Customer; //this.txtDatnJuBianHao.Text = this._pcpgoc.FromPCId; //this.txtCheckStandard.Text = this._pcpgoc.Customer == null ? "" : this._pcpgoc.Customer.CheckedStandard; //this.txtProductName.Text = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ToString(); //this.calcInvoiceXOQuantity.EditValue = this._pcpgoc.InvoiceXOQuantity; //this.txtProductDescription.Rtf = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ProductDescription; //Detail Model.PCPGOnlineCheckDetail d = new Book.Model.PCPGOnlineCheckDetail(); d.PCPGOnlineCheckDetailId = Guid.NewGuid().ToString(); d.PCPGOnlineCheckId = this._pcpgoc.PCPGOnlineCheckId; d.InvoiceCusXOId = xo == null ? "" : xo.CustomerInvoiceXOId; d.PCPGOnlineCheckDetailDate = DateTime.Now; //d.PCPGOnlineCheckDetailTime = DateTime.Now; d.ProductId = SelectModel.ProductId; d.Product = new BL.ProductManager().Get(d.ProductId); d.CheckQuantity = Convert.ToInt32(SelectModel.DetailsSum); d.FromInvoiceId = SelectModel.PronoteHeaderID; if (this._pcpgoc.Customer != null) { d.CheckedStandard = this._pcpgoc.Customer.CheckedStandard; } this._pcpgoc.Details.Add(d); } } this.gridControl1.RefreshDataSource(); } pronoForm.Dispose(); GC.Collect(); }
public RO1(string mPSheaderId) { InitializeComponent(); this.mPSheader = this.mPSheaderManager.Get(mPSheaderId); if (this.mPSheader == null) { return; } this.mPSheader.Details = this.mPSdetailsManager.Select(this.mPSheader); this.DataSource = this.mPSheader.Details; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.MPSdetails; this.xrLabelDate.Text += DateTime.Now.ToShortDateString(); //计划信息 this.xrLabelMPSheaderId.Text = this.mPSheader.Id; //this.xrLabelMPSheaderName.Text=this.mPSheader.MPSheaderName; this.xrLabelMPSStartDate.Text = this.mPSheader.MPSStartDate.Value.ToString("yyyy-MM-dd"); this.xrLabelMPSEndDate.Text = this.mPSheader.MPSEndDate.Value.ToString("yyyy-MM-dd"); this.xrLabelZhiJian.Text = this.mPSheader.MPSheaderState; Model.InvoiceXO InvoiceXO = new BL.InvoiceXOManager().Get(this.mPSheader.InvoiceXOId); if (InvoiceXO != null) { this.xrLabelCustomer.Text = InvoiceXO.Customer.CustomerShortName; this.xrLabelZhiJian.Text = InvoiceXO.xocustomer.CustomerShortName; this.xrLabelCusXOId.Text = InvoiceXO.CustomerInvoiceXOId; this.xrLabelZhiJian.Text = InvoiceXO.xocustomer.CheckedStandard; } // this.xrLabelMPSheaderDesc.Text=this.mPSheader.MPSheaderDesc; if (this.mPSheader.Employee0 != null) { this.xrLabelEmployee0.Text = this.mPSheader.Employee0.EmployeeName; } if (this.mPSheader.AuditEmp != null) { this.xrLabelEmployee1.Text = this.mPSheader.AuditEmp.EmployeeName; } //明细信息 this.xrTableCell3.DataBindings.Add("Text", this.DataSource, Model.MPSdetails.PRO_Inumber); // this.xrTableProductId.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_Id); this.xrTableProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); this.xrTableMPSdetailssum.DataBindings.Add("Text", this.DataSource, Model.MPSdetails.PRO_MPSdetailssum); this.xrTableProductUnit.DataBindings.Add("Text", this.DataSource, Model.MPSdetails.PRO_ProductUnit); // this.xrTableCellProductSpecification.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification); this.xrTableMPSdetailsdes.DataBindings.Add("Text", this.DataSource, Model.MPSdetails.PRO_MPSdetailsdes); this.xrTableCusPro.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); this.xrTableGuiGe.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification); //this.xrTableCellCusPro.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); }
//加工单 private void btnGetPronoteHeader_Click(object sender, EventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(this.nccWorkHouse.EditValue as Model.WorkHouse, 0); if (pronoForm.ShowDialog(this) == DialogResult.OK) { Model.PronoteHeader SelectModel = pronoForm.SelectItem; if (SelectModel != null) { //清空数据 //if (this._pcpgoc.PCPGOnlineCheckType > 0) //{ this._pcpgoc.Details.Clear(); //} this._pcpgoc.PCPGOnlineCheckType = -1; this.layoutDanJuBianHao.Text = "加工單編號:"; this._pcpgoc.InvoiceCusXOId = SelectModel.InvoiceCusId; this._pcpgoc.FromPCId = SelectModel.PronoteHeaderID; if (SelectModel.InvoiceXOId != null) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(SelectModel.InvoiceXOId); this._pcpgoc.Customer = xo.xocustomer; this._pcpgoc.InvoiceXOId = SelectModel.InvoiceXOId; this.txtInvoiceCusXOId.Text = xo.CustomerInvoiceXOId; } this._pcpgoc.CustomerId = this._pcpgoc.Customer == null ? "" : this._pcpgoc.CustomerId; this._pcpgoc.Product = new BL.ProductManager().Get(SelectModel.ProductId); this._pcpgoc.ProductId = SelectModel.ProductId; this._pcpgoc.InvoiceXOQuantity = SelectModel.InvoiceXODetailQuantity; //Controls //this.txtInvoiceCusXOId.Text = this._pcpgoc.InvoiceCusXOId; this.nccCHCustomer.EditValue = this._pcpgoc.Customer; this.txtDatnJuBianHao.Text = this._pcpgoc.FromPCId; this.txtCheckStandard.Text = this._pcpgoc.Customer == null ? "" : this._pcpgoc.Customer.CheckedStandard; this.txtProductName.Text = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ToString(); this.calcInvoiceXOQuantity.EditValue = this._pcpgoc.InvoiceXOQuantity; this.txtProductDescription.Rtf = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ProductDescription; //Detail Model.PCPGOnlineCheckDetail d = new Book.Model.PCPGOnlineCheckDetail(); d.PCPGOnlineCheckDetailId = Guid.NewGuid().ToString(); d.PCPGOnlineCheckId = this._pcpgoc.PCPGOnlineCheckId; d.PCPGOnlineCheckDetailDate = DateTime.Now; d.PCPGOnlineCheckDetailTime = DateTime.Now; //d.Product = SelectModel.Product; //d.ProductId = d.Product == null ? "" : d.Product.ProductId; d.CheckQuantity = SelectModel.DetailsSum.HasValue ? int.Parse(SelectModel.DetailsSum.Value.ToString()) : 0; //d.FromInvoiceId = SelectModel.PronoteHeaderID; this._pcpgoc.Details.Add(d); this.gridControl1.RefreshDataSource(); } } pronoForm.Dispose(); GC.Collect(); }
private void Button_Sure_Click(object sender, EventArgs e) { this.bindingSourceProduceMaterial.DataSource = this._produceMaterialManager.SelectByDateRage(this.dateEditstartdate.DateTime, this.dateEditenddate.DateTime, this.buttonEditProduct1.EditValue as Model.Product, this.checkEditIsClose.Checked, this.txt_InvoiceCusXOId.Text); //SelectState(); foreach (Model.ProduceMaterial model in this.bindingSourceProduceMaterial.DataSource as IList <Model.ProduceMaterial> ) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(model.InvoiceXOId); if (xo != null) { model.CustomerInvoiceXOId = xo.CustomerInvoiceXOId; } } this.gridControl1.RefreshDataSource(); }
private void TakeMaterialChooseForm_Load(object sender, EventArgs e) { this.bindingSourceProduceMaterial.DataSource = this._produceMaterialManager.SelectByDateRage(this.dateEditstartdate.DateTime, global::Helper.DateTimeParse.EndDate, null, false, null); //SelectState(); foreach (Model.ProduceMaterial model in this.bindingSourceProduceMaterial.DataSource as IList <Model.ProduceMaterial> ) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(model.InvoiceXOId); if (xo != null) { model.CustomerInvoiceXOId = xo.CustomerInvoiceXOId; } } this.gridControl1.RefreshDataSource(); }
//采购单 private void btn_invoiceCO_Click(object sender, EventArgs e) { Invoices.CG.CGForm f = new Book.UI.Invoices.CG.CGForm(); if (f.ShowDialog(this) == DialogResult.OK) { //this._pcpgoc.Details.Clear(); foreach (var SelectModel in f.key) { if (SelectModel != null) { this._pcpgoc.PCPGOnlineCheckType = 0; Model.InvoiceXO xo = null; if (SelectModel.Invoice.InvoiceXOId != null) { xo = new BL.InvoiceXOManager().Get(SelectModel.Invoice.InvoiceXOId); this._pcpgoc.Customer = xo == null ? null : xo.xocustomer; this._pcpgoc.InvoiceCusXOId = xo == null ? "" : xo.CustomerInvoiceXOId; } this.txtInvoiceCusXOId.Text = this._pcpgoc.InvoiceCusXOId; //Detail Model.PCPGOnlineCheckDetail d = new Book.Model.PCPGOnlineCheckDetail(); d.PCPGOnlineCheckDetailId = Guid.NewGuid().ToString(); d.PCPGOnlineCheckId = this._pcpgoc.PCPGOnlineCheckId; if (SelectModel.Invoice.InvoiceXOId != null) { d.InvoiceCusXOId = xo == null ? "" : xo.CustomerInvoiceXOId; } d.PCPGOnlineCheckDetailDate = DateTime.Now; //d.PCPGOnlineCheckDetailTime = DateTime.Now; d.ProductId = SelectModel.ProductId; d.Product = SelectModel.Product; d.CheckQuantity = Convert.ToInt32(SelectModel.OrderQuantity); d.FromInvoiceId = SelectModel.InvoiceId; if (this._pcpgoc.Customer != null) { d.CheckedStandard = this._pcpgoc.Customer.CheckedStandard; } this._pcpgoc.Details.Add(d); } } this.gridControl1.RefreshDataSource(); } f.Dispose(); GC.Collect(); }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(0, "Check"); if (pronoForm.ShowDialog(this) == DialogResult.OK) { Model.PronoteHeader currentModel = pronoForm.SelectItem; if (currentModel != null) { this._PCFC.PronoteHeader = currentModel; this._PCFC.PronoteHeaderID = currentModel.PronoteHeaderID; this._PCFC.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._PCFC.Product = new BL.ProductManager().Get(currentModel.ProductId); this._PCFC.ProductId = this._PCFC.Product.ProductId; this._PCFC.CustomerProductName = currentModel.CustomerProductName; //客户型号 this._PCFC.PCFinishCheckInCoiunt = currentModel.InvoiceXODetailQuantity; //this._PCFC.PCFinishCheckCount = Math.Ceiling(Convert.ToDouble(this._PCFC.PCFinishCheckInCoiunt) / 500); this._PCFC.PCFinishCheckCount = Common.AutoCalculation.Calculation(currentModel.CustomerCheckStandard, Convert.ToInt32(this._PCFC.PCFinishCheckInCoiunt)); //this._PCFC.ProductUnit = this._PCFC.Product.QualityTestUnit; //this._PCFC.ProductUnitId = this._PCFC.Product.QualityTestUnitId; var unit = UnitList.ToList().FirstOrDefault(D => D.CnName == currentModel.ProductUnit); if (unit != null) { this._PCFC.ProductUnit = unit; this._PCFC.ProductUnitId = unit.ProductUnitId; } if (currentModel.InvoiceXOId != null) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(currentModel.InvoiceXOId); if (xo != null) { this._PCFC.Pihao = xo.CustomerLotNumber; this._PCFC.PronoteHeader.InvoiceXO = xo; } } this.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
public override void Refresh() { if (this._relationXO == null) { this.AddNew(); } else { if (this.action == "view") { this._relationXO = this.manager.GetDetail(this._relationXO.RelationXOId); } } this.txt_InvoiceXOId.EditValue = this._relationXO.InvoiceXOId; //this.txt_InvoiceCusId.EditValue = this._relationXO.InvoiceCusId; Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this._relationXO.InvoiceXOId); if (xo != null) { this.txt_InvoiceCusId.EditValue = xo.CustomerInvoiceXOId; } else { this.txt_InvoiceCusId.EditValue = null; } this.nccEmp.EditValue = this._relationXO.Employee; this.bindingSourceDetail.DataSource = this._relationXO.Detail; base.Refresh(); this.txt_InvoiceCusId.Properties.ReadOnly = true; this.txt_InvoiceXOId.Properties.ReadOnly = true; switch (this.action) { case "view": this.gridView1.OptionsBehavior.Editable = false; break; default: this.gridView1.OptionsBehavior.Editable = true; break; } this.btn_Search.Enabled = true; }
/// <summary> /// 构造函数,初始化 加工单 /// </summary> /// <param name="condition"></param> public Q49(ConditionPronoteHeader condition) { InitializeComponent(); this.condition = condition; IList <Model.PronoteHeader> list = detailManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, false, false, false); if (list == null || list.Count <= 0) { throw new global::Helper.InvalidValueException("無數據"); } this.xrLabelPrintDate.Text += DateTime.Now.ToShortDateString(); this.xrLabelRepotName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.PronoteHeaderDetails; if (list != null) { foreach (Model.PronoteHeader ph in list) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(ph.InvoiceXOId); if (xo != null) { ph.CustomerShortName = xo.xocustomer.CustomerShortName; ph.CustomerInvoiceXOId = xo.CustomerInvoiceXOId; } headerList1.Add(ph); } } this.DataSource = headerList1; //生產通知 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.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee0Name"); this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductName"); this.xrLabelCustomerProductName.DataBindings.Add("Text", this.DataSource, "CustomerProductName"); this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "CustomerShortName"); this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, "CustomerInvoiceXOId"); this.xrLabelCount.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_DetailsSum); this.xrLabelUnit.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_ProductUnit); this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Pronotedesc); this.xrRichTextProDesc.DataBindings.Add("Rtf", this.DataSource, "ProductDesc"); this.xrSubreport1.ReportSource = new Q49_1(); this.xrSubreport2.ReportSource = new Q49_2(); }
private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(null, 0); if (pronoForm.ShowDialog(this) == DialogResult.OK) { Model.PronoteHeader currentModel = pronoForm.SelectItem; if (currentModel != null) { this.txt_PronoteHeaderId.Text = currentModel.PronoteHeaderID; //this.nccCustomer.EditValue = currentModel.InvoiceXO.Customer; Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(currentModel.InvoiceXOId); if (xo != null) { this.nccCustomer.EditValue = xo.Customer; this.txt_InvoiceCusId.Text = xo.CustomerInvoiceXOId; } //this.txt_Model.Text = (currentModel.Product) == null ? "" : (currentModel.Product).CustomerProductName; Model.Product p = new BL.ProductManager().Get(currentModel.ProductId); if (p != null) { this.txt_Model.Text = p.CustomerProductName; } Model.PCSamplingEarDetail detail = new Book.Model.PCSamplingEarDetail(); detail.PCSamplingEarDetailId = Guid.NewGuid().ToString(); detail.PCSamplingEarDetailDate = DateTime.Now; detail.PCSamplingEarId = this._PCSamplingEar.PCSamplingEarId; detail.Product = p; detail.ProductId = currentModel.ProductId; this._PCSamplingEar.Details.Add(detail); this.bindingSourceDetail.Position = this.bindingSourceDetail.IndexOf(detail); this.gridControl1.RefreshDataSource(); } } pronoForm.Dispose(); GC.Collect(); }
private void barButtonPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new PronoteHeader.ChoosePronoteHeaderDetailsForm(1); if (f.ShowDialog(this) == DialogResult.OK) { if (PronoteHeader.ChoosePronoteHeaderDetailsForm._pronoteHeaderList.Count != 0) { if (this.produceTransfer.Details.Count > 0 && this.produceTransfer.Details[0].ProductId == null) { this.produceTransfer.Details.Remove(this.produceTransfer.Details[0]); } foreach (Model.PronoteHeader pronoteHeader in PronoteHeader.ChoosePronoteHeaderDetailsForm._pronoteHeaderList) { Model.ProduceTransferDetail detail = new Book.Model.ProduceTransferDetail(); detail.ProduceTransferDetailId = Guid.NewGuid().ToString(); if (pronoteHeaderManager.Get(pronoteHeader.PronoteHeaderID) != null) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(pronoteHeaderManager.Get(pronoteHeader.PronoteHeaderID).InvoiceXOId); if (xo != null) { detail.CustomerInvoiceXOId = xo.CustomerInvoiceXOId; } } detail.PronoteHeaderId = pronoteHeader.PronoteHeaderID; detail.Product = pronoteHeader.Product; detail.ProductId = pronoteHeader.ProductId; detail.ProductUnit = pronoteHeader.ProductUnit; detail.ScrapQuantity = 0; detail.ProceduresQuantity = pronoteHeader.DetailsSum; detail.TransferQuantity = pronoteHeader.DetailsSum; this.produceTransfer.Details.Add(detail); this.bindingSourceDetails.Position = this.bindingSourceDetails.IndexOf(detail); } this.gridControl1.RefreshDataSource(); } } }
private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(null, 0); if (pronoForm.ShowDialog(this) == DialogResult.OK) { if (pronoForm.SelectItems == null || pronoForm.SelectItems.Count == 0) { Model.PronoteHeader currentModel = pronoForm.SelectItem; if (currentModel != null) { this.txt_PronoteHeaderId.Text = currentModel.PronoteHeaderID; this._pCAssemblyInspection.PronoteHeader = currentModel; Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(currentModel.InvoiceXOId); if (xo != null) { currentModel.InvoiceXO = xo; this.txt_InvoiceCusId.Text = xo.CustomerInvoiceXOId; } //this.txt_Model.Text = (currentModel.Product) == null ? "" : (currentModel.Product).CustomerProductName; Model.Product p = new BL.ProductManager().Get(currentModel.ProductId); Model.PCAssemblyInspectionDetail detail = new Book.Model.PCAssemblyInspectionDetail(); detail.PCAssemblyInspectionDetailId = Guid.NewGuid().ToString(); detail.PCAssemblyInspectionDetailDate = DateTime.Now; detail.PCAssemblyInspectionId = this._pCAssemblyInspection.PCAssemblyInspectionId; detail.Product = p; detail.ProductId = currentModel.ProductId; detail.CustomerId = xo == null ? null : xo.CustomerId; if (p.IsQiangHua == true) { detail.Jiagongbie = "強化"; } else if (p.IsFangWu == true) { detail.Jiagongbie = "防霧"; } else if (p.IsNoQiangFang == true) { detail.Jiagongbie = "無強化防霧"; } this._pCAssemblyInspection.Details.Add(detail); this.bindingSourceDetail.Position = this.bindingSourceDetail.IndexOf(detail); } } else { foreach (var item in pronoForm.SelectItems) { Model.Product p = new BL.ProductManager().Get(item.ProductId); Model.PCAssemblyInspectionDetail detail = new Book.Model.PCAssemblyInspectionDetail(); detail.PCAssemblyInspectionDetailId = Guid.NewGuid().ToString(); detail.PCAssemblyInspectionDetailDate = DateTime.Now; detail.PCAssemblyInspectionId = this._pCAssemblyInspection.PCAssemblyInspectionId; detail.Product = p; detail.ProductId = item.ProductId; //detail.CustomerId = xo == null ? null : xo.CustomerId; if (p.IsQiangHua == true) { detail.Jiagongbie = "強化"; } else if (p.IsFangWu == true) { detail.Jiagongbie = "防霧"; } else if (p.IsNoQiangFang == true) { detail.Jiagongbie = "無強化防霧"; } this._pCAssemblyInspection.Details.Add(detail); this.bindingSourceDetail.Position = this.bindingSourceDetail.IndexOf(detail); } } this.gridControl1.RefreshDataSource(); } pronoForm.Dispose(); GC.Collect(); }
public ROJGZHishi(string pronoteHeaderId, int flag) { InitializeComponent(); this.pronoteHeader = this.pronoteHeaderManager.GetDetails(pronoteHeaderId); //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.Pronotedetails; if (flag == 5) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (flag == 4) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; } this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString(); if (pronoteHeader.WorkHouse != null) { this.xrLabelWorkHouse.Text = this.pronoteHeader.WorkHouse.Workhousename; } Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get(this.pronoteHeader.MRSdetailsId); if (mrsdetail != null) { this.xrLabelBeforepPackage.Text = mrsdetail.BeforePackageProduct == null ? string.Empty : (mrsdetail.BeforePackageProduct.IsCustomerProduct.HasValue && mrsdetail.BeforePackageProduct.IsCustomerProduct.Value ? mrsdetail.BeforePackageProduct.ProductName + "{" + mrsdetail.BeforePackageProduct.CustomerProductName + "}" : mrsdetail.BeforePackageProduct.ProductName); } else { this.xrLabelBeforepPackage.Text = string.Empty; } //生產通知 this.xrLabelPronoteHeaderID.Text = this.pronoteHeader.PronoteHeaderID; this.xrLabelPronoteDte.Text = this.pronoteHeader.PronoteDate.Value.ToString("yyyy-MM-dd"); this.xrLabelMRP.Text = this.pronoteHeader.MRSHeaderId; if (this.pronoteHeader.Employee0 != null && flag != 1) { this.xrLabelEmployee.Text = this.pronoteHeader.Employee0.EmployeeName; } this.xrLabel14.Text = this.pronoteHeader.AuditEmp == null ? "" : this.pronoteHeader.AuditEmp.EmployeeName; if (pronoteHeader.Product != null) { this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; if (string.IsNullOrEmpty(pronoteHeader.Product.CustomerProductName)) { this.xrLabelCustomerProductName.Text = new Help().GetCustomerProductNameByPronoteHeaderId(pronoteHeader.PronoteHeaderID, pronoteHeader.ProductId); } else { this.xrLabelCustomerProductName.Text = pronoteHeader.Product.CustomerProductName; } this.xrRichTextProDesc.Rtf = this.pronoteHeader.Product.ProductDescription; } Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this.pronoteHeader.InvoiceXOId); if (xo != null) { this.xrLabelCheckedStandard.Text = xo.xocustomer.CheckedStandard; this.xrLabelCustomer.Text = xo.xocustomer.CustomerShortName; this.xrLabelCustomerXOId.Text = xo.CustomerInvoiceXOId; if (flag != 0) { this.xrLabelPiHao.Text = xo.CustomerLotNumber; if (flag != 5) { this.xrLabelXOJHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); //生产加工单和加工指示单 不显示交期 } } if (xo.xocustomer != null && !string.IsNullOrEmpty(xo.xocustomer.CheckedStandard)) { if (xo.xocustomer.CheckedStandard.ToLower().Contains("jis") && xo.xocustomer.CustomerFullName.ToUpper().Contains("MIDORI")) { //CreateTagLable("JIS"); this.lbl_JIS.Text = "JIS"; } else if (xo.xocustomer.CheckedStandard.ToLower().Contains("as")) { //CreateTagLable("AS"); this.lbl_JIS.Text = "AS"; } } } this.xrLabelCount.Text = pronoteHeader.DetailsSum.ToString(); this.xrLabelUnit.Text = pronoteHeader.ProductUnit; this.xrLabelPronotedesc.Text = this.pronoteHeader.Pronotedesc; this.lbl_MaterialSum.Text = this.pronoteHeader.Materialprocessum == null ? "" : this.pronoteHeader.Materialprocessum.ToString(); //this.lblChakuang.Text = this.pronoteHeader.Chakuang; //this.lblPaihe.Text = this.pronoteHeader.Paihe; //this.lblMoshu.Text = this.pronoteHeader.Moshu; //if (this.pronoteHeader.DetailProcedures != null && this.pronoteHeader.DetailProcedures.Count > 0) //{ // this.pronoteHeader.DetailProcedures = this.pronoteHeader.DetailProcedures.OrderByDescending(p => p.PronoteProceduresDate).ToList(); // if (this.pronoteHeader.DetailProcedures.First().WorkHouse != null) // this.xrLabelhouseId.Text = this.pronoteHeader.DetailProcedures.First().WorkHouse.Workhousename; //} this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); }
public RO(string pronoteHeaderId, int flag) { InitializeComponent(); this.pronoteHeader = this.pronoteHeaderManager.GetDetails(pronoteHeaderId); //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; //this.xrLabelDataName.Text = Properties.Resources.Pronotedetails; if (flag == 5) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (flag == 4) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; } this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString(); if (pronoteHeader.WorkHouse != null) { this.xrLabelWorkHouse.Text = this.pronoteHeader.WorkHouse.Workhousename; } Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get(this.pronoteHeader.MRSdetailsId); if (mrsdetail != null) { this.xrLabelBeforepPackage.Text = mrsdetail.BeforePackageProduct == null ? string.Empty : (mrsdetail.BeforePackageProduct.IsCustomerProduct.HasValue && mrsdetail.BeforePackageProduct.IsCustomerProduct.Value ? mrsdetail.BeforePackageProduct.ProductName + "{" + mrsdetail.BeforePackageProduct.CustomerProductName + "}" : mrsdetail.BeforePackageProduct.ProductName); } else { this.xrLabelBeforepPackage.Text = string.Empty; } //生產通知 this.xrLabelPronoteHeaderID.Text = this.pronoteHeader.PronoteHeaderID; this.xrLabelPronoteDte.Text = this.pronoteHeader.PronoteDate.Value.ToString("yyyy-MM-dd"); this.xrLabelMRP.Text = this.pronoteHeader.MRSHeaderId; if (this.pronoteHeader.Employee0 != null && flag != 1) { this.xrLabelEmployee.Text = this.pronoteHeader.Employee0.EmployeeName; } this.xrLabel14.Text = this.pronoteHeader.AuditEmp == null ? "" : this.pronoteHeader.AuditEmp.EmployeeName; if (pronoteHeader.Product != null) { this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; //this.xrLabelCustomerProductName.Text = pronoteHeader.Product.CustomerProductName; this.xrRichTextProDesc.Rtf = this.pronoteHeader.Product.ProductDescription; if (this.pronoteHeader.Product.AttrZhengMai != null) { this.RichTextZhengMai.Rtf = this.pronoteHeader.Product.AttrZhengMai; } if (this.pronoteHeader.Product.AttrCeMai != null) { this.RichTextCeMai.Rtf = this.pronoteHeader.Product.AttrCeMai; } } Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this.pronoteHeader.InvoiceXOId); if (xo != null) { //this.xrLabelCheckedStandard.Text = xo.xocustomer.CheckedStandard; this.xrLabelCustomer.Text = xo.xocustomer.CustomerShortName; this.xrLabelCustomerXOId.Text = xo.CustomerInvoiceXOId; //this.xrLabelPiHao.Text = xo.CustomerLotNumber; this.xrLabelXOJHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); this.lblCustomerId.Text = xo.Customer.Id; } this.xrLabelCount.Text = pronoteHeader.DetailsSum.ToString(); this.xrLabelUnit.Text = pronoteHeader.ProductUnit; this.xrLabelPronotedesc.Text = this.pronoteHeader.Pronotedesc; //if (this.pronoteHeader.DetailProcedures != null && this.pronoteHeader.DetailProcedures.Count > 0) //{ // this.pronoteHeader.DetailProcedures = this.pronoteHeader.DetailProcedures.OrderByDescending(p => p.PronoteProceduresDate).ToList(); // if (this.pronoteHeader.DetailProcedures.First().WorkHouse != null) // this.xrLabelhouseId.Text = this.pronoteHeader.DetailProcedures.First().WorkHouse.Workhousename; //} this.lblInvoiceXODetailQuantity.Text = this.pronoteHeader.InvoiceXODetailQuantity == null ? "0" : this.pronoteHeader.InvoiceXODetailQuantity.ToString(); this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); }
public ROInvoice(Model.PackingInvoiceHeader invoiceList) { InitializeComponent(); if (!string.IsNullOrEmpty(invoiceList.Unit)) { this.xrTableCell5.Text = string.Format("Quantity ({0})", invoiceList.Unit); } this.DataSource = invoiceList.Details; this.lbl_PackingNo.Text = invoiceList.InvoiceNo; //this.lbl_PackingDate.Text = invoiceList.InvoiceDate.Value.ToString("yyyy-MM-dd"); this.lbl_PackingDate.Text = invoiceList.InvoiceDate.Value.ToString("MMM dd.yyyy", CultureInfo.CreateSpecificCulture("en-GB")); //this.lbl_CustomerFullName.Text = invoiceList.Customer.CustomerFullName; //this.lbl_address.Text = invoiceList.Customer.CustomerAddress; this.lbl_CustomerFullName.Text = invoiceList.CustomerFullName; this.lbl_address.Text = invoiceList.CustomerAddress; this.lbl_PayCondition.Text = invoiceList.TradingCondition; this.lbl_PerSS.Text = invoiceList.PerSS; if (invoiceList.SailingOnOrAbout != null) { this.lbl_SailingDate.Text = invoiceList.SailingOnOrAbout.Value.ToString("MMM dd.yyyy", CultureInfo.CreateSpecificCulture("en-GB")); } if (invoiceList.FromPort != null) { this.lbl_From.Text = invoiceList.FromPort.PortName; } if (invoiceList.ToPort != null) { this.lbl_TO.Text = invoiceList.ToPort.PortName; } this.lbl_marks.Text = invoiceList.MarkNos; if (!string.IsNullOrEmpty(invoiceList.Unit)) { this.lbl_TotalQTY.Text = invoiceList.Details.Sum(P => P.Quantity).Value.ToString("0.00") + " " + invoiceList.Unit; } else { this.lbl_TotalQTY.Text = invoiceList.Details.Sum(P => P.Quantity).Value.ToString("0.00") + " PCS"; } if (invoiceList.Details != null && invoiceList.Details.Count > 0) { string currency = new BL.InvoiceXOManager().GetCurrencyByInvoiceId(invoiceList.Details[0].InvoiceXODetail.InvoiceId); string currencyENName = Model.ExchangeRate.GetCurrencyENName(currency); string currencySign = Model.ExchangeRate.GetCurrencySign(currency); this.xrTableCell6.Text = "Amount (" + currencyENName + ")"; this.TCUnitPriceCurrency.Text = currencySign; this.TCAmountCurrency.Text = currencySign; this.lbl_TotalAmount.Text = currencyENName + " " + invoiceList.Details.Sum(P => P.Amount).Value.ToString("0.00"); } TC_No.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_Number); TC_PONO.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_PONo); //TC_CUSTNO.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_CUSTNO); //TC_ProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); TC_CUSTNO.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); TC_ProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); TCQTY.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_ShowQty); TC_UnitPrice.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_UnitPrice, "{0:0.00}"); TC_Amount.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_Amount, "{0:0.00}"); }
public XR(string ProduceStatisticsCheckId) { InitializeComponent(); this._ProduceStatisticsCheck = this.ProduceStatisticsCheckManager.Get(ProduceStatisticsCheckId); if (this._ProduceStatisticsCheck == null) { return; } this._ProduceStatisticsCheck.Details = this.ProduceStatisticsCheckdetailsManager.Select(this._ProduceStatisticsCheck); this.DataSource = this._ProduceStatisticsCheck.Details; this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.ProduceCheck; this.xrLabelPrintDate.Text += DateTime.Now.ToShortDateString(); this.xrLabelProduceStatisticsDate.Text = this._ProduceStatisticsCheck.ProduceStatisticsCheckDate.Value.ToString("yyyy-MM-dd"); this.xrLabelProduceStatisticsId.Text = this._ProduceStatisticsCheck.ProduceStatisticsCheckId; if (this._ProduceStatisticsCheck.Employee0 != null) { this.xrLabelEmployeeId.Text = this._ProduceStatisticsCheck.Employee0.EmployeeName; } if (this._ProduceStatisticsCheck.Employee1 != null) { this.xrLabel4.Text = this._ProduceStatisticsCheck.Employee1.EmployeeName; } this.xrLabelPronoteHeaderID.Text = this._ProduceStatisticsCheck.PronoteHeaderID; if (!string.IsNullOrEmpty(this._ProduceStatisticsCheck.PronoteHeaderID)) { Model.PronoteHeader pronoteHeader = new BL.PronoteHeaderManager().Get(this._ProduceStatisticsCheck.PronoteHeaderID); if (pronoteHeader != null) { Model.InvoiceXO invoiceXO = new BL.InvoiceXOManager().Get(pronoteHeader.InvoiceXOId); this.xrLabelCustomerXoId.Text = invoiceXO == null ? string.Empty : invoiceXO.CustomerInvoiceXOId; if (pronoteHeader.Product != null) { this.xrLabelProductId.Text = pronoteHeader.Product.Id; this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; this.xrRichText3.Rtf = pronoteHeader.Product.ProductDescription; } } } else { this.xrLabelCustomerXoId.Text = string.Empty; } this.xrLabelDescription.Text = this._ProduceStatisticsCheck.Description; //Ã÷ϸ this.xrTableCellDetailDate.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_DetailDate, "{0:yyyy-MM-dd}"); this.xrTableCellBusinessHoursType.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_BusinessHoursType); this.xrTableCellEmployee0Id.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellEmployee1Id.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellProduceQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_ProduceQuantity); this.xrTableCellAPian.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_APian); this.xrTableCellBPian.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_BPian); this.xrTableCellCPian.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_CPian); this.xrTableCellFractionDefective.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_FractionDefective); }
public XR(string ProduceStatisticsId) { InitializeComponent(); this.produceStatistics = this.produceStatisticsManager.Get(ProduceStatisticsId); if (this.produceStatistics == null) { return; } this.produceStatistics.Details = this.produceStatisticsdetailsManager.Select(this.produceStatistics); this.DataSource = this.produceStatistics.Details; this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.ProduceNums; this.xrLabelPrintDate.Text += DateTime.Now.ToShortDateString(); this.xrLabelProduceStatisticsDate.Text = this.produceStatistics.ProduceStatisticsDate.Value.ToString("yyyy-MM-dd"); this.xrLabelProduceStatisticsId.Text = this.produceStatistics.ProduceStatisticsId; if (this.produceStatistics.Employee != null) { this.xrLabelEmployeeId.Text = this.produceStatistics.Employee.EmployeeName; } if (this.produceStatistics.WorkHouse != null) { this.xrLabelWorkHouseId.Text = this.produceStatistics.WorkHouse.Workhousename; } this.xrLabelPronoteHeaderID.Text = this.produceStatistics.PronoteHeaderID; if (!string.IsNullOrEmpty(this.produceStatistics.PronoteHeaderID)) { Model.PronoteHeader pronoteHeader = new BL.PronoteHeaderManager().Get(this.produceStatistics.PronoteHeaderID); if (pronoteHeader != null) { Model.InvoiceXO invoiceXO = new BL.InvoiceXOManager().Get(pronoteHeader.InvoiceXOId); this.xrLabelCustomerXoId.Text = invoiceXO == null ? string.Empty : invoiceXO.CustomerInvoiceXOId; if (pronoteHeader.Product != null) { this.xrLabelProductId.Text = pronoteHeader.Product.Id; this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; this.xrRichText3.Rtf = pronoteHeader.Product.ProductDescription; } } } else { this.xrLabelCustomerXoId.Text = string.Empty; } if (this.produceStatistics.Procedures != null) { this.xrLabelProceduresId.Text = this.produceStatistics.Procedures.Id; this.xrRichText1.Rtf = this.produceStatistics.Procedures.Procedurename; } this.xrLabelDescription.Text = this.produceStatistics.Description; //Ã÷ϸ this.xrTableCellDate.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_DetailDate, "{0:yyyy-MM-dd}"); this.xrTableCellType.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_BusinessHoursType); this.xrTableCellEllo.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellElpple.DataBindings.Add("Text", this.DataSource, "Employee." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellPcount.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_ProduceQuantity); this.xrTableCellHege.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_HeGeQuantity); this.xrTableCellNoPcount.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_RejectionRate); this.xrTableCelldescription.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_Description); this.xrTableCellUpdatDate.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_UpdateTime, "{0:yyyy-MM-dd}"); this.xrTableCell25.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_HeiDian); this.xrTableCell26.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_Zazhi); this.xrTableCell27.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_JingDian); this.xrTableCell28.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_ChaShang); this.xrTableCell29.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_FuMo); this.xrTableCell30.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_SuoShui); this.xrTableCell31.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_GuoHuo); this.xrTableCell32.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_BaiYan); this.xrLabel2.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_HeiYan); this.xrLabel4.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_JieHeXian); this.xrLabel6.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_HuiWen); this.xrLabel8.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_QiPao); this.xrLabel10.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_LengLiao); this.xrLabel12.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_GuaiShouZhuangShang); this.xrLabel14.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_ChaMoCiShu); this.xrLabel16.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsDetail.PRO_LiaoDian); }
public RO(string produceMaterialID) { InitializeComponent(); this.produceMaterial = this.produceMaterialManager.Get(produceMaterialID); if (this.produceMaterial == null) { return; } if (this.produceMaterial.SourceType == 0) { Model.PronoteHeader pheader = ph.Get(produceMaterial.InvoiceId); if (pheader != null) { this.xrLabelProduct.Text = string.IsNullOrEmpty(pheader.Product.CustomerProductName) ? pheader.Product.ProductName : pheader.Product.ProductName + "{" + pheader.Product.CustomerProductName + "}"; this.xrLabelInvoiceSum.Text = pheader.InvoiceXODetailQuantity == null ? null : pheader.InvoiceXODetailQuantity.ToString(); } } this.produceMaterial.Details = this.produceMaterialdetailsManager.Select(this.produceMaterial); this.DataSource = this.produceMaterial.Details; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.ProduceMaterialdetails; //加工领料 this.xrLabelProduceMaterialDate.Text = this.produceMaterial.ProduceMaterialDate.Value.ToString("yyyy-MM-dd"); this.xrBarCodeProduceMaterialID.Text = this.produceMaterial.ProduceMaterialID; this.xrLabelInsertTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); if (this.produceMaterial.SourceType == 1) { this.xrLabelSourceType.Text = "需求計劃"; } else { this.xrLabelSourceType.Text = "生產加工"; } this.xrLabelPronoteHeaderID.Text = this.produceMaterial.InvoiceId; // this.xrLabelMRP.Text=this.produceMaterial. //if (this.produceMaterial.Employee1 != null) //{ // this.xrLabelEmployee1.Text = this.produceMaterial.Employee1.EmployeeName; //} if (this.produceMaterial.Employee0 != null) { this.xrLabelEmployee0.Text = this.produceMaterial.Employee0.EmployeeName; } if (this.produceMaterial.AuditEmp != null) { this.xrLabelEmployee2.Text = this.produceMaterial.AuditEmp.EmployeeName; } if (this.produceMaterial.WorkHouse != null) { this.xrLabelDepartment.Text = this.produceMaterial.WorkHouse.Workhousename; } this.xrLabel1ProduceMaterialdesc.Text = this.produceMaterial.ProduceMaterialdesc; this.xrLabelProduceMaterialId.Text = this.produceMaterial.ProduceMaterialID; //if (this.produceMaterial.InvoiceXO != null) //{ // this.xrLabelXOId.Text = invoiceXoManager.Get(this.produceMaterial.InvoiceXO)==null?"":invoiceXoManager.Get(this.produceMaterial.InvoiceXO).CustomerInvoiceXOId; //} //if (this.produceMaterial.SourceType != 1 && !string.IsNullOrEmpty(this.produceMaterial.InvoiceId)) //{ // Model.MRSdetails mrsdetail = new Book.Model.MRSdetails(); // Model.PronoteHeader pronoteHeader = new BL.PronoteHeaderManager().Get(this.produceMaterial.InvoiceId); // if (pronoteHeader != null) // { // mrsdetail = new BL.MRSdetailsManager().Get(pronoteHeader.MRSdetailsId); // } //Model.InvoiceXO invoiceXO = new BL.InvoiceXOManager().Get(produceMaterial.InvoiceXOId); //if (invoiceXO != null) //{ // this.xrLabelPiHao.Text = invoiceXO.CustomerLotNumber; //} //} if (!string.IsNullOrEmpty(this.produceMaterial.InvoiceXOId)) { Model.InvoiceXO invoiceXO = new BL.InvoiceXOManager().Get(produceMaterial.InvoiceXOId); if (invoiceXO != null) { this.xrLabelXOId.Text = invoiceXO.CustomerInvoiceXOId; this.xrLabelCustomer.Text = invoiceXO.xocustomer == null ? null : invoiceXO.xocustomer.ToString(); this.lblCustomerPH.Text = invoiceXO.CustomerLotNumber; } } //明细 this.xrTableCell5.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_Inumber); //this.xrTableCell1ProductId.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_Id); //this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.Pro_ProductNameWithVersion); this.xrTableCusProName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); this.xrTableCellQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_Materialprocessum); //this.xrTableHasOutDepot.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_Distributioned, "{0:0.####}"); // this.xrTableMPSSum.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_MPSDetailsSum, "{0:0.####}"); this.xrTableCellUnit.DataBindings.Add("Text", this.DataSource, "ProductUnit"); this.xrTableCellProductSpecification.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_StocksQuantity, "{0:0.####}"); this.xrTableCellPihao.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_Pihao); // this.xrTableMRP.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_MRSHeaderId); // this.xrTableCusXOID.DataBindings.Add("Text", this.DataSource, Model.ProduceMaterialdetails.PRO_CustomerInvoiceXOId); this.TCNextWorkstation.DataBindings.Add("Text", this.DataSource, "NextWorkHouse." + Model.WorkHouse.PROPERTY_WORKHOUSENAME); this.xrRichText1.DataBindings.Add("Rtf", this.DataSource, "ProductDescription"); }
public RO(string pronoteHeaderId, int flag) { InitializeComponent(); this.pronoteHeader = this.pronoteHeaderManager.GetDetails(pronoteHeaderId); //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; //this.xrLabelDataName.Text = Properties.Resources.Pronotedetails; if (flag == 5) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (flag == 4) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; this.lbl_PageSign.Text = "QR8-06-09-1"; } this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString(); if (pronoteHeader.WorkHouse != null) { this.xrLabelWorkHouse.Text = this.pronoteHeader.WorkHouse.Workhousename; } Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get(this.pronoteHeader.MRSdetailsId); if (mrsdetail != null) { this.xrLabelBeforepPackage.Text = mrsdetail.BeforePackageProduct == null ? string.Empty : (mrsdetail.BeforePackageProduct.IsCustomerProduct.HasValue && mrsdetail.BeforePackageProduct.IsCustomerProduct.Value ? mrsdetail.BeforePackageProduct.ProductName + "{" + mrsdetail.BeforePackageProduct.CustomerProductName + "}" : mrsdetail.BeforePackageProduct.ProductName); } else { this.xrLabelBeforepPackage.Text = string.Empty; } //生產通知 this.xrLabelPronoteHeaderID.Text = this.pronoteHeader.PronoteHeaderID; this.xrLabelPronoteDte.Text = this.pronoteHeader.PronoteDate.Value.ToString("yyyy-MM-dd"); this.xrLabelMRP.Text = this.pronoteHeader.MRSHeaderId; if (this.pronoteHeader.Employee0 != null && flag != 1) { this.xrLabelEmployee.Text = this.pronoteHeader.Employee0.EmployeeName; } this.xrLabel14.Text = this.pronoteHeader.AuditEmp == null ? "" : this.pronoteHeader.AuditEmp.EmployeeName; if (pronoteHeader.Product != null) { this.xrLabelProductName.Text = pronoteHeader.Product.ProductName + " 版次:" + pronoteHeader.Product.ProductVersion; if (string.IsNullOrEmpty(pronoteHeader.Product.CustomerProductName)) { this.xrLabelCustomerProductName.Text = new Help().GetCustomerProductNameByPronoteHeaderId(pronoteHeader.PronoteHeaderID, pronoteHeader.ProductId); } else { this.xrLabelCustomerProductName.Text = pronoteHeader.Product.CustomerProductName; } this.xrRichTextProDesc.Rtf = this.pronoteHeader.Product.ProductDescription; //商品正侧唛单独划分出一张表 2021年7月18日20:28:12 //if (this.pronoteHeader.Product.AttrZhengMai != null) // this.RichTextZhengMai.Rtf = this.pronoteHeader.Product.AttrZhengMai; //if (this.pronoteHeader.Product.AttrCeMai != null) // this.RichTextCeMai.Rtf = this.pronoteHeader.Product.AttrCeMai; Model.ProductMark mark = new BL.ProductMarkManager().SelectByProductId(this.pronoteHeader.ProductId); if (mark != null) { if (!string.IsNullOrEmpty(mark.MainMark)) { this.RichTextZhengMai.Rtf = mark.MainMark; } if (!string.IsNullOrEmpty(mark.SideMark)) { this.RichTextCeMai.Rtf = mark.SideMark; } } } Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this.pronoteHeader.InvoiceXOId); if (xo != null) { this.xrLabelCheckedStandard.Text = xo.xocustomer.CheckedStandard; this.xrLabelCustomer.Text = xo.xocustomer.CustomerShortName; this.xrLabelCustomerXOId.Text = xo.CustomerInvoiceXOId; this.xrLabelPiHao.Text = xo.CustomerLotNumber; this.xrLabelXOJHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); if (xo.xocustomer != null && !string.IsNullOrEmpty(xo.xocustomer.CheckedStandard)) { if (xo.xocustomer.CheckedStandard.ToLower().Contains("jis") && xo.xocustomer.CustomerFullName.ToUpper().Contains("MIDORI")) { //CreateTagLable("JIS"); this.lbl_JIS.Text = "JIS"; } else if (xo.xocustomer.CheckedStandard.ToLower().Contains("as")) { //CreateTagLable("AS"); this.lbl_JIS.Text = "AS"; } } } this.xrLabelCount.Text = pronoteHeader.DetailsSum.ToString(); this.xrLabelUnit.Text = pronoteHeader.ProductUnit; this.xrLabelPronotedesc.Text = this.pronoteHeader.Pronotedesc; this.lbl_ProduceMaterial.Text = this.pronoteHeader.Materialprocessum == null ? "" : this.pronoteHeader.Materialprocessum.ToString(); //if (this.pronoteHeader.DetailProcedures != null && this.pronoteHeader.DetailProcedures.Count > 0) //{ // this.pronoteHeader.DetailProcedures = this.pronoteHeader.DetailProcedures.OrderByDescending(p => p.PronoteProceduresDate).ToList(); // if (this.pronoteHeader.DetailProcedures.First().WorkHouse != null) // this.xrLabelhouseId.Text = this.pronoteHeader.DetailProcedures.First().WorkHouse.Workhousename; //} this.lblInvoiceXODetailQuantity.Text = this.pronoteHeader.InvoiceXODetailQuantity == null ? "0" : this.pronoteHeader.InvoiceXODetailQuantity.ToString(); this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); }
public RO3(string pronoteHeaderId, int flag) { InitializeComponent(); this.pronoteHeader = this.pronoteHeaderManager.Get(pronoteHeaderId); if (this.pronoteHeader == null) { return; } this.pronoteHeader.DetailProcedures = this.pronoteProceduresDetailManager.GetPronotedetailsMaterialByHeaderId(this.pronoteHeader); if (this.pronoteHeader.DetailProcedures != null) { foreach (Model.PronoteProceduresDetail detail in this.pronoteHeader.DetailProcedures) { this.machineList = this.pronoteMachineManager.GetPronoteMachineByPronoteProceduresDetailId(detail.PronoteProceduresDetailId); { foreach (Model.PronoteMachine machine in machineList) { if (machineList.IndexOf(machine) == machineList.Count - 1) { detail.Machine += machine.PronoteMachineName; } else { detail.Machine += machine.PronoteMachineName + ","; } //this.proceManager.Insert(promachine); } } } } this.DataSource = this.pronoteHeader.DetailProcedures; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.ProducePronoteName; if (flag == 1) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (flag == 2) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; } this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToString("yyyy-MM-dd"); //生產通知 this.xrLabelPronoteHeaderID.Text = this.pronoteHeader.PronoteHeaderID; this.xrLabelPronoteDte.Text = this.pronoteHeader.PronoteDate.Value.ToString("yyyy-MM-dd"); this.xrRichTextProDesc.Rtf = this.pronoteHeader.Product.ProductDescription; Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get(this.pronoteHeader.MRSdetailsId); if (mrsdetail != null) { this.xrLabelBeforepPackage.Text = mrsdetail.BeforePackageProduct == null ? string.Empty : (mrsdetail.BeforePackageProduct.IsCustomerProduct.HasValue && mrsdetail.BeforePackageProduct.IsCustomerProduct.Value ? mrsdetail.BeforePackageProduct.ProductName + "{" + mrsdetail.BeforePackageProduct.CustomerProductName + "}" : mrsdetail.BeforePackageProduct.ProductName); } else { this.xrLabelBeforepPackage.Text = string.Empty; } if (pronoteHeader.WorkHouse != null) { this.xrLabelWorkHouse.Text = this.pronoteHeader.WorkHouse.Workhousename; } if (this.pronoteHeader.Employee0 != null) { this.xrLabelEmployee0.Text = this.pronoteHeader.Employee0.EmployeeName; } if (pronoteHeader.Product != null) { // this.xrLabelProductId.Text = pronoteHeader.Product.Id; this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; this.xrLabelCustomerProductName.Text = pronoteHeader.Product.CustomerProductName; } Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this.pronoteHeader.InvoiceXOId); if (xo != null) { this.xrLabelCustomer.Text = xo.xocustomer.CustomerShortName; this.xrLabelCheckedStandard.Text = xo.xocustomer.CheckedStandard; this.xrLabelCustomerXOId.Text = xo.CustomerInvoiceXOId; this.xrLabelXOJHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); } this.xrLabelCount.Text = pronoteHeader.DetailsSum.ToString(); this.xrLabelUnit.Text = pronoteHeader.ProductUnit; this.xrLabelPronotedesc.Text = this.pronoteHeader.Pronotedesc; //this.xrLabelMachine.Text= //明细 this.xrTableCellPronoteProceduresDate.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_PronoteProceduresDate, "{0:yyyy-MM-dd}"); //this.xrTableCellProceduresNo.DataBindings.Add("Text", this.DataSource,Model.PronoteProceduresDetail.PRO_ProceduresNo); this.xrTableCellWorkHouseId.DataBindings.Add("Text", this.DataSource, "WorkHouse." + Model.WorkHouse.PROPERTY_WORKHOUSENAME); this.xrTableCellSupplierId.DataBindings.Add("Text", this.DataSource, "Supplier." + Model.Supplier.PROPERTY_SUPPLIERSHORTNAME); this.xrTableCellPronoteYingQuantity.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_PronoteYingQuantity); //this.xrTableCellFulfillQuantity.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_FulfillQuantity); //this.xrTableCellDeposeQuantity.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_DeposeQuantity); //this.xrTableCellcheckQuantity.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_checkQuantity); //this.xrTableCellLossQuantity.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_LossQuantity); this.xrRichText1.DataBindings.Add("Rtf", this.DataSource, "Procedures." + Model.Procedures.PRO_Procedurename); this.xrTableCell12.DataBindings.Add("Text", this.DataSource, "Procedures." + Model.Procedures.PRO_Proceduredescription); this.xrTableCellNO.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_ProceduresNo); this.xrTableCellMachine.DataBindings.Add("Text", this.DataSource, Model.PronoteProceduresDetail.PRO_Machine); }
public RO(string pronoteHeaderId, int flag) { InitializeComponent(); this.pronoteHeader = this.pronoteHeaderManager.GetDetails(pronoteHeaderId); //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; //this.xrLabelDataName.Text = Properties.Resources.Pronotedetails; if (flag == 5) { this.xrLabelDataName.Text = Properties.Resources.GZZhiShi; } else if (flag == 4) { this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong; this.lbl_PageSign.Text = "QR8-06-09-1"; } this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToString("yyyy-MM-dd"); if (pronoteHeader.WorkHouse != null) { this.xrLabelWorkHouse.Text = this.pronoteHeader.WorkHouse.Workhousename; } Model.MRSdetails mrsdetail = this.mRSDetailsManager.Get(this.pronoteHeader.MRSdetailsId); if (mrsdetail != null) { this.xrLabelBeforepPackage.Text = mrsdetail.BeforePackageProduct == null ? string.Empty : (mrsdetail.BeforePackageProduct.IsCustomerProduct.HasValue && mrsdetail.BeforePackageProduct.IsCustomerProduct.Value ? mrsdetail.BeforePackageProduct.ProductName + "{" + mrsdetail.BeforePackageProduct.CustomerProductName + "}" : mrsdetail.BeforePackageProduct.ProductName); //this.lblPlanNum.Text = mrsdetail.MRSdetailsQuantity.ToString(); } else { this.xrLabelBeforepPackage.Text = string.Empty; } //生產通知 this.xrLabelPronoteHeaderID.Text = this.pronoteHeader.PronoteHeaderID; this.xrLabelPronoteDte.Text = this.pronoteHeader.PronoteDate.Value.ToString("yyyy-MM-dd"); this.xrLabelMRP.Text = this.pronoteHeader.MRSHeaderId; this.lblBGHandBookId.Text = this.pronoteHeader.HandbookId; this.lblBGHandBookDetailId.Text = this.pronoteHeader.HandbookProductId; this.lblPlanNum.Text = this.pronoteHeader.InvoiceXODetailQuantity.HasValue ? this.pronoteHeader.InvoiceXODetailQuantity.Value.ToString() : ""; if (this.pronoteHeader.Employee0 != null && flag != 1) { this.xrLabelEmployee.Text = this.pronoteHeader.Employee0.EmployeeName; } if (pronoteHeader.Product != null) { this.xrLabelProductName.Text = pronoteHeader.Product.ProductName; this.lbl_Pro_Id.Text = pronoteHeader.Product.Id; if (string.IsNullOrEmpty(pronoteHeader.Product.CustomerProductName)) { this.xrLabelCustomerProductName.Text = CommonHelp.GetCustomerProductNameByPronoteHeaderId(pronoteHeader, pronoteHeader.ProductId, pronoteHeader.HandbookProductId); } else { this.xrLabelCustomerProductName.Text = pronoteHeader.Product.CustomerProductName; } this.xrRichTextProDesc.Rtf = this.pronoteHeader.Product.ProductDescription; //商品正侧唛单独划分出一张表 2021年8月22日22:53:53 //if (this.pronoteHeader.Product.AttrZhengMai != null) // this.RichTextZhengMai.Rtf = this.pronoteHeader.Product.AttrZhengMai; //if (this.pronoteHeader.Product.AttrCeMai != null) // this.RichTextCeMai.Rtf = this.pronoteHeader.Product.AttrCeMai; Model.ProductMark mark = new BL.ProductMarkManager().SelectByProductId(this.pronoteHeader.ProductId); if (mark != null) { if (!string.IsNullOrEmpty(mark.MainMark)) { this.RichTextZhengMai.Rtf = mark.MainMark; } if (!string.IsNullOrEmpty(mark.SideMark)) { this.RichTextCeMai.Rtf = mark.SideMark; } } } Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(this.pronoteHeader.InvoiceXOId); if (xo != null) { this.xrLabelCheckedStandard.Text = xo.xocustomer.CheckedStandard; this.xrLabelCustomer.Text = xo.xocustomer.CustomerShortName; this.xrLabelCustomerXOId.Text = xo.CustomerInvoiceXOId; this.xrLabelPiHao.Text = xo.CustomerLotNumber; this.xrLabelXOJHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); } this.xrLabelCount.Text = pronoteHeader.DetailsSum.ToString(); this.xrLabelUnit.Text = pronoteHeader.ProductUnit; this.xrLabelPronotedesc.Text = this.pronoteHeader.Pronotedesc; //if (this.pronoteHeader.DetailProcedures != null && this.pronoteHeader.DetailProcedures.Count > 0) //{ // this.pronoteHeader.DetailProcedures = this.pronoteHeader.DetailProcedures.OrderByDescending(p => p.PronoteProceduresDate).ToList(); // if (this.pronoteHeader.DetailProcedures.First().WorkHouse != null) // this.xrLabelhouseId.Text = this.pronoteHeader.DetailProcedures.First().WorkHouse.Workhousename; //} this.xrSubreport1.ReportSource = new RO1(); this.xrSubreport2.ReportSource = new RO2(); }
public RO(Model.PCFinishCheck _pcfc) { InitializeComponent(); if (_pcfc == null) { return; } //CompanyInfo this._PCFinishCheckId = _pcfc.PCFinishCheckID; this.lblCompanyName.Text = BL.Settings.CompanyChineseName; this.lblDataName.Text = Properties.Resources.PCFinishCheck; this.lblPrintDate.Text += DateTime.Now.ToShortDateString(); //Details Controls this.lblPCFinishCheckID.Text = _pcfc.PCFinishCheckID; this.lblPCFinishCheckDate.Text = _pcfc.PCFinishCheckDate.HasValue ? _pcfc.PCFinishCheckDate.Value.ToShortDateString() : ""; this.lblProductName.Text = _pcfc.Product == null ? "" : _pcfc.Product.ToString(); this.lblBuMen.Text = _pcfc.WorkHouse == null ? "" : _pcfc.WorkHouse.ToString(); //this.lblInvoiceCusXOId.Text = _pcfc.InvoiceCusXOId; this.lblPCFinishCheckCount.Text = _pcfc.PCFinishCheckCount.ToString(); //this.lblPCFinishCheckInCoiunt.Text = _pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : ""; this.lblPCFinishCheckInCoiunt.Text = (_pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : "") + Environment.NewLine + Environment.NewLine + (string.IsNullOrEmpty(_pcfc.InvoiceCountNum) ? "" : ("¿Í‘ôÓ††Î“QË㔵Á¿£º" + Environment.NewLine + _pcfc.InvoiceCountNum)); this.lblPCFinishCheckDesc.Text = _pcfc.PCFinishCheckDesc; this.lblEmployee0.Text = _pcfc.Employee0 == null ? "" : _pcfc.Employee0.ToString(); this.lblEmployee1.Text = _pcfc.Employee1 == null ? "" : _pcfc.Employee1.ToString(); this.lblCustomerProductName.Text = _pcfc.Product == null ? "" : _pcfc.Product.CustomerProductName; this.lblPronoteHeardId.Text = _pcfc.PronoteHeaderID; this.lbl_proudctunit.Text = _pcfc.ProductUnit == null ? "" : _pcfc.ProductUnit.ToString(); this.lbl_AnnualRing.Text = _pcfc.AnnualRing; this.checkEdit1.Checked = _pcfc.IsMuShiJianYan.HasValue ? _pcfc.IsMuShiJianYan.Value : false; this.lbl_Pihao.Text = _pcfc.Pihao; if (_pcfc.PronoteHeader != null) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(_pcfc.PronoteHeader.InvoiceXOId); if (xo != null) { this.lbl_TestStandard.Text = xo.xocustomer.CheckedStandard; this.lbl_CustomerName.Text = xo.Customer.CustomerFullName; this.lbl_InvoiceXOCustomer.Text = xo.xocustomer.CustomerFullName; this.lbl_JHDate.Text = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd"); this.lblInvoiceCusXOId.Text = xo.CustomerInvoiceXOId; } } //details this.lblDZDWQDW.Text = Trans(_pcfc.AttrDZDWQDW); this.lblJWYHWRL.Text = Trans(_pcfc.AttrJWYHWRL); this.lblGZBKYRL.Text = Trans(_pcfc.AttrGZBKYRL); this.lblZZWBXGJ.Text = Trans(_pcfc.AttrZZWBXGJ); this.lblJPBKGCS.Text = Trans(_pcfc.AttrJPBKGS); this.lblJPJJHZQ.Text = Trans(_pcfc.AttrJPJHZQ); this.lblJPJSX.Text = Trans(_pcfc.AttrJPSX); this.lblJJSFTSYH.Text = Trans(_pcfc.AttrJJSFTSYH); this.lblGX.Text = Trans(_pcfc.AttrGX); this.lblTSL.Text = Trans(_pcfc.AttrTSL); this.lblCJBZ.Text = Trans(_pcfc.AttrCJBZ); this.lblWXTB.Text = Trans(_pcfc.AttrWXTB); this.lblZMCM.Text = Trans(_pcfc.AttrZMCM); this.lblSLDKSFMF.Text = Trans(_pcfc.AttrSLDSFMF); this.lblNHDQSFZQ.Text = Trans(_pcfc.AttrNHDQSFZQ); this.lblNHTB.Text = Trans(_pcfc.AttrNHTB); this.lblJSSFZQ.Text = Trans(_pcfc.AttrJSSFZQ); this.lblJDZRFS.Text = Trans(_pcfc.AttrJDZRFS); this.lblPKZRFS.Text = Trans(_pcfc.AttrPKZRFS); this.lblSLDNHWXTMTBSFZQ.Text = Trans(_pcfc.AttrSLDNHWXTMSFZQ); this.TCAttrDGBLTest.Text = Trans(_pcfc.AttrDGBLTest); this.lblESSSFZH.Text = Trans(_pcfc.AttrESSSFZH); this.lblESSFYGZTZ.Text = Trans(_pcfc.AttrESSFYGZTZ); listOpticsTest = new BL.OpticsTestManager().FSelect(this._PCFinishCheckId); if (listOpticsTest != null && listOpticsTest.Count > 0) { this.xrSubreportGX.ReportSource = new PCPGOnlineCheck.subReportGX("PCFinishCheck"); } else { this.Detail.Visible = false; } }
private void btn_invoiceCO_Click(object sender, EventArgs e) { Invoices.CG.CGForm f = new Book.UI.Invoices.CG.CGForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.key.Count == 0) { return; } this._pcpgoc.Details.Clear(); this._pcpgoc.PCPGOnlineCheckType = 2; this.layoutDanJuBianHao.Text = "采购单编号:"; this._pcpgoc.FromPCId = f.key[0].InvoiceId; this._pcpgoc.Customer = f.key[0].Invoice.Customer; this._pcpgoc.CustomerId = f.key[0].Invoice.CustomerId; this._pcpgoc.InvoiceCusXOId = f.key[0].Invoice.InvoiceCustomXOId; this._pcpgoc.Product = f.key[0].Product; this._pcpgoc.ProductId = f.key[0].ProductId; this._pcpgoc.InvoiceXOQuantity = f.key[0].OrderQuantity; this._pcpgoc.InvoiceXOId = f.key[0].Invoice.InvoiceXOId; if (!string.IsNullOrEmpty(f.key[0].Invoice.InvoiceXOId)) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(f.key[0].Invoice.InvoiceXOId); this.txtInvoiceCusXOId.Text = xo == null ? "" : xo.CustomerInvoiceXOId; } this.nccCHCustomer.EditValue = this._pcpgoc.Customer; this.txtDatnJuBianHao.Text = this._pcpgoc.FromPCId; this.txtCheckStandard.Text = this._pcpgoc.Customer == null ? "" : this._pcpgoc.Customer.CheckedStandard; this.txtProductName.Text = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ToString(); this.calcInvoiceXOQuantity.EditValue = this._pcpgoc.InvoiceXOQuantity; this.txtProductDescription.Rtf = this._pcpgoc.Product == null ? "" : this._pcpgoc.Product.ProductDescription; foreach (var SelectModel in f.key) { if (SelectModel != null) { //Detail Model.PCPGOnlineCheckDetail d = new Book.Model.PCPGOnlineCheckDetail(); d.PCPGOnlineCheckDetailId = Guid.NewGuid().ToString(); d.PCPGOnlineCheckId = this._pcpgoc.PCPGOnlineCheckId; d.PCPGOnlineCheckDetailDate = DateTime.Now; d.PCPGOnlineCheckDetailTime = DateTime.Now; //d.PCPGOnlineCheckDetailTime = DateTime.Now; //d.ProductId = SelectModel.ProductId; //d.Product = SelectModel.Product; d.CheckQuantity = Convert.ToInt32(SelectModel.OrderQuantity); d.FromInvoiceId = SelectModel.InvoiceId; //if (this._pcpgoc.Customer != null) // d.CheckedStandard = this._pcpgoc.Customer.CheckedStandard; this._pcpgoc.Details.Add(d); } } this.gridControl1.RefreshDataSource(); } f.Dispose(); GC.Collect(); }
public RO(Model.PCFinishCheck _pcfc) { InitializeComponent(); if (_pcfc == null) { return; } //CompanyInfo this._PCFinishCheckId = _pcfc.PCFinishCheckID; this.lblCompanyName.Text = BL.Settings.CompanyChineseName; this.lblDataName.Text = Properties.Resources.PCFinishCheck; this.lblPrintDate.Text += DateTime.Now.ToShortDateString(); //Details Controls this.lblPCFinishCheckID.Text = _pcfc.PCFinishCheckID; this.lblPCFinishCheckDate.Text = _pcfc.PCFinishCheckDate.HasValue ? _pcfc.PCFinishCheckDate.Value.ToShortDateString() : ""; this.lblProductName.Text = _pcfc.Product == null ? "" : _pcfc.Product.ToString(); this.lblBuMen.Text = _pcfc.WorkHouse == null ? "" : _pcfc.WorkHouse.ToString(); this.lblInvoiceCusXOId.Text = _pcfc.InvoiceCusXOId; this.lblPCFinishCheckCount.Text = _pcfc.PCFinishCheckCount.ToString(); this.lblPCFinishCheckInCoiunt.Text = _pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : ""; this.lblPCFinishCheckDesc.Text = _pcfc.PCFinishCheckDesc; this.lblEmployee0.Text = _pcfc.Employee0 == null ? "" : _pcfc.Employee0.ToString(); this.lblEmployee1.Text = _pcfc.Employee1 == null ? "" : _pcfc.Employee1.ToString(); this.lblCustomerProductName.Text = _pcfc.Product == null ? "" : _pcfc.Product.CustomerProductName; this.lblPronoteHeardId.Text = _pcfc.PronoteHeaderID; this.lbl_proudctunit.Text = _pcfc.ProductUnit == null ? "" : _pcfc.ProductUnit.ToString(); this.lbl_AnnualRing.Text = _pcfc.AnnualRing; if (_pcfc.PronoteHeader != null) { Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(_pcfc.PronoteHeader.InvoiceXOId); this.lbl_TestStandard.Text = xo.xocustomer.CheckedStandard; this.lbl_CustomerName.Text = xo.Customer.CustomerFullName; this.lbl_InvoiceXOCustomer.Text = xo.xocustomer.CustomerFullName; } //details this.lblDZDWQDW.Text = Trans(_pcfc.AttrDZDWQDW); this.lblJWYHWRL.Text = Trans(_pcfc.AttrJWYHWRL); this.lblGZBKYRL.Text = Trans(_pcfc.AttrGZBKYRL); this.lblZZWBXGJ.Text = Trans(_pcfc.AttrZZWBXGJ); this.lblJPBKGCS.Text = Trans(_pcfc.AttrJPBKGS); this.lblJPJJHZQ.Text = Trans(_pcfc.AttrJPJHZQ); this.lblJPJSX.Text = Trans(_pcfc.AttrJPSX); this.lblJJSFTSYH.Text = Trans(_pcfc.AttrJJSFTSYH); this.lblGX.Text = Trans(_pcfc.AttrGX); this.lblTSL.Text = Trans(_pcfc.AttrTSL); this.lblCJBZ.Text = Trans(_pcfc.AttrCJBZ); this.lblWXTB.Text = Trans(_pcfc.AttrWXTB); this.lblZMCM.Text = Trans(_pcfc.AttrZMCM); this.lblSLDKSFMF.Text = Trans(_pcfc.AttrSLDSFMF); this.lblNHDQSFZQ.Text = Trans(_pcfc.AttrNHDQSFZQ); this.lblNHTB.Text = Trans(_pcfc.AttrNHTB); this.lblJSSFZQ.Text = Trans(_pcfc.AttrJSSFZQ); this.lblJDZRFS.Text = Trans(_pcfc.AttrJDZRFS); this.lblPKZRFS.Text = Trans(_pcfc.AttrPKZRFS); this.lblSLDNHWXTMTBSFZQ.Text = Trans(_pcfc.AttrSLDNHWXTMSFZQ); this.TCAttrDGBLTest.Text = Trans(_pcfc.AttrDGBLTest); this.xrSubreportGX.ReportSource = new PCPGOnlineCheck.subReportGX("PCFinishCheck"); }
public ROInvoice(Model.PackingInvoiceHeader invoiceList) { InitializeComponent(); if (!string.IsNullOrEmpty(invoiceList.Unit)) { this.xrTableCell5.Text = string.Format("Quantity ({0})", invoiceList.Unit); } this.DataSource = invoiceList.Details; this.lbl_PackingNo.Text = invoiceList.InvoiceNo; this.lbl_PackingDate.Text = invoiceList.InvoiceDate.Value.ToString("yyyy/MM/dd"); this.lbl_CustomerFullName.Text = invoiceList.CustomerFullName; this.lbl_address.Text = invoiceList.CustomerAddress; this.lbl_PerSS.Text = invoiceList.PerSS; if (invoiceList.SailingOnOrAbout != null) { this.lbl_SailingDate.Text = invoiceList.SailingOnOrAbout.Value.ToString("yyyy-MM-dd"); } if (invoiceList.FromPort != null) { this.lbl_From.Text = invoiceList.FromPort.PortName; } if (invoiceList.ToPort != null) { this.lbl_TO.Text = invoiceList.ToPort.PortName; } this.lbl_InvoiceOf.Text = invoiceList.PackingListOf; this.lbl_Attn.Text = invoiceList.Attn; this.lbl_Term.Text = invoiceList.Term; this.lbl_ShippedBy.Text = invoiceList.ShippedBy; this.lbl_ShipTo.Text = invoiceList.ShipTo; this.lbl_ShipToAddress.Text = invoiceList.ShipToAddress; this.lbl_TotalEnglish.Text = invoiceList.TotalEnglish; if (invoiceList.Bank != null) { this.lbl_BankName.Text = invoiceList.Bank.BankName; this.lbl_BankAddress.Text = invoiceList.Bank.BankAddress; this.lbl_BankPhone.Text = invoiceList.Bank.BankPhone; this.lbl_BankFax.Text = invoiceList.Bank.Fax; this.lbl_BankAccountNo.Text = invoiceList.Bank.Id; this.lbl_BankSwiftCode.Text = invoiceList.Bank.SWIFTCode; //this.xrLabel17 } if (!string.IsNullOrEmpty(invoiceList.Unit)) { this.lbl_TotalQTY.Text = invoiceList.Details.Sum(P => P.Quantity).Value.ToString("0.##") + " " + invoiceList.Unit; } else { this.lbl_TotalQTY.Text = invoiceList.Details.Sum(P => P.Quantity).Value.ToString("0.##") + " PCS"; } if (invoiceList.Details != null && invoiceList.Details.Count > 0) { //string currency = new BL.InvoiceXOManager().GetCurrencyByInvoiceId(invoiceList.Details[0].InvoiceXODetail.InvoiceId); string currency = ""; if (invoiceList.Details.FirstOrDefault(d => d.InvoiceXODetail != null) != null) { currency = new BL.InvoiceXOManager().GetCurrencyByInvoiceId(invoiceList.Details.First(d => d.InvoiceXODetail != null).InvoiceXODetail.InvoiceId); } string currencyENName = Model.ExchangeRate.GetCurrencyENName(currency); string currencySign = Model.ExchangeRate.GetCurrencySignByCNName(currency); this.xrTableCell6.Text = "Amount (" + currencyENName + ")"; this.TCUnitPriceCurrency.Text = currencySign; this.TCAmountCurrency.Text = currencySign; this.lbl_TotalAmount.Text = currencyENName + " " + invoiceList.Details.Sum(P => P.Amount).Value.ToString("N3"); } //TC_No.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_Number); TC_PONO.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_PONo); TC_ProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); TCQTY.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_ShowQty, "{0:0.##}"); TC_UnitPrice.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_UnitPrice, "{0:N3}"); TC_Amount.DataBindings.Add("Text", this.DataSource, Model.PackingInvoiceDetail.PRO_Amount, "{0:N3}"); }