//选择加工单 private void btn_PronoteHeader_Click(object sender, EventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItems != null) { foreach (var item in f.SelectItems) { Model.PCEarplugsResilienceCheckDetail detail = new Book.Model.PCEarplugsResilienceCheckDetail(); detail.PCEarplugsResilienceCheckDetailId = Guid.NewGuid().ToString(); detail.Number = (this._pCEarplugsResilienceCheck.Details.Count + 1).ToString(); detail.FromId = item.PronoteHeaderID; detail.Product = item.Product; detail.ProductId = item.ProductId; detail.ProductUnit = item.ProductUnit; detail.InvoiceXOId = item.InvoiceXOId; detail.InvoiceXOQuantity = item.InvoiceXODetailQuantity; Model.InvoiceXO xo = invoiceXOManager.Get(detail.InvoiceXOId); if (xo != null) { detail.InvoiceXO = xo; } this._pCEarplugsResilienceCheck.Details.Add(detail); } this.gridControl1.RefreshDataSource(); } } }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs 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._pcClarity.PronoteHeaderId = currentModel.PronoteHeaderID; this._pcClarity.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._pcClarity.Product = new BL.ProductManager().Get(currentModel.ProductId); this._pcClarity.ProductId = currentModel.ProductId; this._pcClarity.CheckStadard = currentModel.CustomerCheckStandard; this._pcClarity.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity; var unit = UnitList.ToList().FirstOrDefault(D => D.CnName == currentModel.ProductUnit); if (unit != null) { this._pcClarity.ProductUnit = unit; this._pcClarity.ProductUnitId = unit.ProductUnitId; } this.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
//選取加工單 private void simpleButton1_Click(object sender, EventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItems != null && f.SelectItems.Count > 0) { Model.PCMouldOnlineCheckDetail model; foreach (var item in f.SelectItems) { model = new Book.Model.PCMouldOnlineCheckDetail(); model.PCMouldOnlineCheckDetailId = Guid.NewGuid().ToString(); model.OnlineDate = DateTime.Now; model.CheckDate = DateTime.Now; model.ProductId = item.ProductId; model.Product = this.productManager.Get(item.ProductId); model.InvoiceXOId = item.InvoiceXOId; model.InvoiceXO = this.invoiceXOManager.Get(item.InvoiceXOId); model.PronoteHeaderID = item.PronoteHeaderID; this._pCMouldOnlineCheck.Detail.Add(model); } } } this.gridControl1.RefreshDataSource(); }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs 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._PCIC.WorkHouse = (this.nccWorkHouse.EditValue as Model.WorkHouse); if (this._PCIC.WorkHouse != null) { this._PCIC.WorkHouseId = this._PCIC.WorkHouse.WorkHouseId; } this._PCIC.PCImpactCheckDate = this.DE_PCImpactCheckDate.DateTime; this._PCIC.PronoteHeaderId = currentModel.PronoteHeaderID; this._PCIC.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._PCIC.Product = new BL.ProductManager().Get(currentModel.ProductId); this._PCIC.ProductId = this._PCIC.Product.ProductId; this._PCIC.mCheckStandard = currentModel.CustomerCheckStandard; this._PCIC.PCFromType = -1; //单据类型 this._PCIC.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity.HasValue ? currentModel.InvoiceXODetailQuantity.Value : 0; this.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
//组装加工 private void smp_PronoteHeader_Click(object sender, EventArgs e) { produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { this._depotIn.Details.Clear(); foreach (var item in produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm._pronoteHeaderList) { this._depotInDetail = new Book.Model.DepotInDetail(); this._depotInDetail.DepotInDetailId = Guid.NewGuid().ToString(); _depotInDetail.Inumber = this._depotIn.Details.Count + 1; // this._depotInDetail.DepotInPrice = item.ProduceInDepotPrice.Value; this._depotInDetail.DepotInQuantity = item.DetailsSum; // this._depotInDetail.DepotInTotal = item.ProduceMoney.Value; //this._depotInDetail.DepotPositionId = item.DepotPositionId; //this._depotInDetail.DepotPosition = item.DepotPosition; this._depotInDetail.ProductId = item.ProductId; this._depotInDetail.ProductUnit = item.ProductUnit; //if(item.ProductProce!=null) //this._depotInDetail.Product = item.ProductProce; //else this._depotInDetail.Product = item.Product; this._depotInDetail.PronoteHeaderId = item.PronoteHeaderID; // this._depotInDetail.ProduceInDepotDetailId = item.ProduceInDepotDetailId; // this._depotInDetail.Description=item.de this._depotIn.Details.Add(this._depotInDetail); } this.gridControl1.RefreshDataSource(); } }
//加工单 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(); }
private void buttonEditPronote2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(1); if (f.ShowDialog(this) == DialogResult.OK) { this.buttonEditPronote2.EditValue = f.SelectItem; } f.Dispose(); GC.Collect(); }
//加工单 private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { //if (f.SelectItem != null) //{ // this.txt_PronoteHeaderId.EditValue = f.SelectItem.PronoteHeaderID; // Model.PCFirstOnlineCheckDetail model = new Book.Model.PCFirstOnlineCheckDetail(); // model.PCFirstOnlineCheckDetailId = Guid.NewGuid().ToString(); // model.PCFirstOnlineCheckId = this._PCFirstOnlineCheck.PCFirstOnlineCheckId; // model.InvoiceXOId = f.SelectItem.InvoiceXOId; // model.InvoiceXOCusId = f.SelectItem.InvoiceCusId; // model.ProductName = f.SelectItem.ProductName; // model.ProductId = f.SelectItem.ProductId; // model.Employee = BL.V.ActiveOperator.Employee; // model.EmployeeId = BL.V.ActiveOperator.EmployeeId; // model.CheckDate = DateTime.Now; // this.bindingSourceDetail.Add(model); // this.gridControl1.RefreshDataSource(); //} if (f.SelectItems != null && f.SelectItems.Count > 0) { foreach (var item in f.SelectItems) { //this.txt_PronoteHeaderId.EditValue = item.PronoteHeaderID; this.txt_CustomerProduct.EditValue = item.Product == null ? "" : item.Product.CustomerProductName; this.txt_CheckedStandard.EditValue = item.CustomerCheckStandard; //this.txt_Product.EditValue = item.ProductName; this.txt_CusXOId.EditValue = item.InvoiceCusId; this.cobProductUnit.Text = item.ProductUnit; Model.PCFirstOnlineCheckDetail model = new Book.Model.PCFirstOnlineCheckDetail(); model.PCFirstOnlineCheckDetailId = Guid.NewGuid().ToString(); model.PCFirstOnlineCheckId = this._PCFirstOnlineCheck.PCFirstOnlineCheckId; //model.InvoiceXOId = item.InvoiceXOId; //model.InvoiceXOCusId = item.InvoiceCusId; //model.ProductName = item.ProductName; //model.ProductId = item.ProductId; model.Employee = BL.V.ActiveOperator.Employee; model.EmployeeId = BL.V.ActiveOperator.EmployeeId; model.CheckDate = DateTime.Now; this.bindingSourceDetail.Add(model); this.gridControl1.RefreshDataSource(); } } } }
//加工单 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 btnGetPronoteHeader_Click(object sender, EventArgs 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._pcdic.PronoteHeaderId = currentModel.PronoteHeaderID; this._pcdic.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._pcdic.Product = new BL.ProductManager().Get(currentModel.ProductId); this._pcdic.ProductId = this._pcdic.Product.ProductId; this._pcdic.CheckStandard = currentModel.CustomerCheckStandard; this._pcdic.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity; //this._pcdic.PCDoubleImpactCheckCount = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(currentModel.InvoiceXODetailQuantity) / 500)); if (pcType == 0) { this._pcdic.PCDoubleImpactCheckCount = Common.AutoCalculation.Calculation("csa", Convert.ToInt32(currentModel.InvoiceXODetailQuantity)); } else if (pcType == 1) { this._pcdic.PCDoubleImpactCheckCount = Common.AutoCalculation.Calculation("en", Convert.ToInt32(currentModel.InvoiceXODetailQuantity)); } else if (pcType == 2) { this._pcdic.PCDoubleImpactCheckCount = Common.AutoCalculation.Calculation("as", Convert.ToInt32(currentModel.InvoiceXODetailQuantity)); } this._pcdic.ProductUnitId = this._pcdic.Product.QualityTestUnitId; this._pcdic.ProductUnit = this._pcdic.Product.QualityTestUnit; //if (!string.IsNullOrEmpty(this._pcdic.CheckStandard)) //{ // if (this.CJLD.Any(d => d.SettingDescription == this._pcdic.CheckStandard)) // this.coBoxCJLD.EditValue = this.CJLD.First(d => d.SettingDescription == this._pcdic.CheckStandard).SettingCurrentValue; // if (this.ZQZL.Any(d => d.SettingDescription == this._pcdic.CheckStandard)) // this.coBoxZQZL.EditValue = this.ZQZL.First(d => d.SettingDescription == this._pcdic.CheckStandard).SettingCurrentValue; // if (this.LYBTXX.Any(d => d.SettingDescription == this._pcdic.CheckStandard)) // this.coBoxLYBTXX.EditValue = this.LYBTXX.First(d => d.SettingDescription == this._pcdic.CheckStandard).SettingCurrentValue; // if (this.JIARE.Any(d => d.SettingDescription == this._pcdic.CheckStandard)) // this.comBox_ChongJICeShiJiaRe.EditValue = this.JIARE.First(d => d.SettingDescription == this._pcdic.CheckStandard).SettingCurrentValue; // if (this.LENGDONG.Any(d => d.SettingDescription == this._pcdic.CheckStandard)) // this.comBox_ChongJICeShiLengDong.EditValue = this.LENGDONG.First(d => d.SettingDescription == this._pcdic.CheckStandard).SettingCurrentValue; //} this.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItem != null) { this.txt_PronoteHeaderId.EditValue = f.SelectItem.PronoteHeaderID; this.txt_InvoiceXOId.EditValue = null; this.txt_ProductName.EditValue = f.SelectItem.ProductName; this._ProductOnlineCheck.ProductId = f.SelectItem.ProductId; this.richTextBoxRemark.Rtf = f.SelectItem.Product == null ? null : f.SelectItem.Product.ProductDescription; } } }
private void btn_PronoteHeader_Click(object sender, EventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItem != null) { this._pcBoxFootCheck.PronoteHeaderId = f.SelectItem.PronoteHeaderID; this._pcBoxFootCheck.InvoiceXO = f.SelectItem.InvoiceXO; this._pcBoxFootCheck.InvoiceXOId = f.SelectItem.InvoiceXOId; this.txt_PronoteHeader.EditValue = f.SelectItem.PronoteHeaderID; this.spinEditGetNum.EditValue = f.SelectItem.DetailsSum; this._pcBoxFootCheck.ProductId = f.SelectItem.ProductId; this.txt_Product.EditValue = f.SelectItem.ProductName; } } }
//选择加工单据 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(); }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(null, 0); if (pronoForm.ShowDialog(this) == DialogResult.OK) { if (this._PCIC.Details.Count > 0 && string.IsNullOrEmpty(this._PCIC.Details[0].ProductId)) { this._PCIC.Details.RemoveAt(0); } this._PCIC.PCFromType = -1; //单据类型 //this._PCIC.Details.Clear(); //Model.PronoteHeader currentModel = pronoForm.SelectItem; Model.PCImpactCheckDetail detail; foreach (var item in PronoteHeader.ChoosePronoteHeaderDetailsForm._pronoteHeaderList) { //this._PCIC.PronoteHeaderId = currentModel.PronoteHeaderID; //this._PCIC.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; //this._PCIC.Product = new BL.ProductManager().Get(currentModel.ProductId); //this._PCIC.ProductId = this._PCIC.Product.ProductId; //this._PCIC.mCheckStandard = currentModel.CustomerCheckStandard; //this._PCIC.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity.HasValue ? currentModel.InvoiceXODetailQuantity.Value : 0; detail = new Book.Model.PCImpactCheckDetail(); detail.PCImpactCheckDetailId = Guid.NewGuid().ToString(); detail.PCImpactCheckId = this._PCIC.PCImpactCheckId; detail.attrDate = DateTime.Now; detail.PronoteHeaderId = item.PronoteHeaderID; detail.Product = new BL.ProductManager().Get(item.ProductId); detail.ProductId = item.ProductId; detail.ProductUnitId = item.ProductUnit; detail.InvoiceCusXOId = item.CustomerInvoiceXOId; detail.mCheckStandard = item.CustomerCheckStandard; detail.InvoiceXOQuantity = item.DetailsSum.HasValue ? item.DetailsSum.Value : 0; this._PCIC.Details.Add(detail); } //this.Refresh(); this.gridControl1.RefreshDataSource(); } pronoForm.Dispose(); GC.Collect(); }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs 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._pcdic.PronoteHeaderId = currentModel.PronoteHeaderID; this._pcdic.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._pcdic.Product = new BL.ProductManager().Get(currentModel.ProductId); this._pcdic.ProductId = this._pcdic.Product.ProductId; this._pcdic.CheckStandard = currentModel.CustomerCheckStandard; this._pcdic.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity; this.Refresh(); } } pronoForm.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.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.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
//选择加工单据 private void btnGetPronoteHeader_Click(object sender, EventArgs 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._ansipcic.Invoice = currentModel.InvoiceXO; this._ansipcic.InvoiceId = currentModel.InvoiceXOId; this._ansipcic.PronoteHeaderId = currentModel.PronoteHeaderID; this._ansipcic.InvoiceCusXOId = currentModel.CustomerInvoiceXOId; this._ansipcic.Product = new BL.ProductManager().Get(currentModel.ProductId); this._ansipcic.ProductId = this._ansipcic.Product.ProductId; this._ansipcic.CheckStandard = currentModel.CustomerCheckStandard; this._ansipcic.InvoiceXOQuantity = currentModel.InvoiceXODetailQuantity; //this._ansipcic.ANSIPCImpactCheckCount = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(currentModel.InvoiceXODetailQuantity) / 500)); this._ansipcic.ANSIPCImpactCheckCount = Common.AutoCalculation.Calculation(this.ForANSIOrJIS, Convert.ToInt32(currentModel.InvoiceXODetailQuantity)); this._ansipcic.UnitId = this._ansipcic.Product.QualityTestUnitId; this._ansipcic.Unit = this._ansipcic.Product.QualityTestUnit; //if (!string.IsNullOrEmpty(this._ansipcic.CheckStandard)) //{ // if (this.CJLD.Any(d => d.SettingDescription == this._ansipcic.CheckStandard)) // this.coBoxCJLD.EditValue = this.CJLD.First(d => d.SettingDescription == this._ansipcic.CheckStandard).SettingCurrentValue; // if (this.ZQZL.Any(d => d.SettingDescription == this._ansipcic.CheckStandard)) // this.coBoxZQZL.EditValue = this.ZQZL.FirstOrDefault(d => d.SettingDescription == this._ansipcic.CheckStandard).SettingCurrentValue; // if (this.LYBTXX.Any(d => d.SettingDescription == this._ansipcic.CheckStandard)) // this.coBoxLYBTXX.EditValue = this.LYBTXX.First(d => d.SettingDescription == this._ansipcic.CheckStandard).SettingCurrentValue; //} this.Refresh(); } } pronoForm.Dispose(); GC.Collect(); }
//选择加工单 private void btn_PronoteHeader_Click(object sender, EventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItems != null) { foreach (var item in f.SelectItems) { Model.PCFlameRetardantDetail detail = new Book.Model.PCFlameRetardantDetail(); detail.PCFlameRetardantDetailId = Guid.NewGuid().ToString(); detail.Number = this._pCFlameRetardant.Details.Count + 1; detail.Product = item.Product; detail.ProductId = item.ProductId; detail.EmployeeId = BL.V.ActiveOperator.EmployeeId; detail.InvoiceXOId = item.InvoiceXOId; detail.PronoteHeaderId = item.PronoteHeaderID; if (string.IsNullOrEmpty(this.Pihao)) { Model.InvoiceXO xo = invoiceXOManager.Get(detail.InvoiceXOId); if (xo != null) { detail.Pihao = xo.CustomerLotNumber; } } else { detail.Pihao = this.Pihao; } this._pCFlameRetardant.Details.Add(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) { 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 btn_PronoteHeader_Click(object sender, EventArgs e) { PronoteHeader.ChoosePronoteHeaderDetailsForm f = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(); if (f.ShowDialog(this) == DialogResult.OK) { if (f.SelectItem != null) { this._pcBoxFootCheck.PronoteHeaderId = f.SelectItem.PronoteHeaderID; this.txt_PronoteHeader.EditValue = f.SelectItem.PronoteHeaderID; this.spinEditGetNum.EditValue = f.SelectItem.DetailsSum; this._pcBoxFootCheck.ProductId = f.SelectItem.ProductId; this.txt_Product.EditValue = f.SelectItem.ProductName; this.richTextBox1.Rtf = f.SelectItem.ProductDesc; this._pcBoxFootCheck.InvoiceXOId = f.SelectItem.InvoiceXOId; this._pcBoxFootCheck.InvoiceXO = f.SelectItem.InvoiceXO; if (f.SelectItem.InvoiceXO != null) { this.txt_CheckStandard.EditValue = f.SelectItem.InvoiceXO.xocustomer.CheckedStandard; this.txt_InvoiceXO.EditValue = f.SelectItem.InvoiceXO.CustomerInvoiceXOId; this.newChooseContorlCustomer.EditValue = f.SelectItem.InvoiceXO.Customer; } } } }
//选择加工单 private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(3, true); if (pronoForm.ShowDialog(this) == DialogResult.OK) { Model.PronoteHeader pronoteHeader = pronoForm.SelectItem; if (pronoteHeader != null) { this.txt_PronoteHeaderId.Text = pronoteHeader.PronoteHeaderID; this.txt_InvoiceCusId.Text = pronoteHeader.CustomerInvoiceXOId; this._PCDataInput.ProductId = pronoteHeader.ProductId; this.txt_ProductName.Text = pronoteHeader.ProductName; this.txt_Customer.Text = pronoteHeader.CustomerShortName; this.cob_CheckStandard.EditValue = pronoteHeader.CustomerCheckStandard; //光学机内容拉取该加工单对应的 组装成品检验单的光学测试 Model.PCFinishCheck pcFinishCheck = (new BL.PCFinishCheckManager()).SelectByPronoteHeader(pronoteHeader.PronoteHeaderID); if (pcFinishCheck != null) { this.ncc_Tester1.EditValue = pcFinishCheck.Employee0; this.spe_TestQuantity.EditValue = pcFinishCheck.PCFinishCheckCount; this.sp_OrderQuantity.EditValue = pcFinishCheck.PCFinishCheckInCoiunt; IList <Model.OpticsTest> opticsTestList = new BL.OpticsTestManager().FSelect(pcFinishCheck.PCFinishCheckID); foreach (var opticsTest in opticsTestList) { Model.PCOpticalMachine pCOpticalMachine = new Book.Model.PCOpticalMachine(); pCOpticalMachine.NoId = opticsTest.ManualId; pCOpticalMachine.PCOpticalMachineId = Guid.NewGuid().ToString(); pCOpticalMachine.LeftA = Convert.ToDecimal(opticsTest.LattrA); pCOpticalMachine.LeftC = Convert.ToDecimal(opticsTest.LattrC); pCOpticalMachine.LeftS = Convert.ToDecimal(opticsTest.LattrS); pCOpticalMachine.LeftLevelNum = Convert.ToDecimal(opticsTest.LinPSM); pCOpticalMachine.LeftLevelJudge = opticsTest.LeftLevelJudge; pCOpticalMachine.LeftVerticalNum = Convert.ToDecimal(opticsTest.LupPSM); pCOpticalMachine.LeftVerticalJudge = opticsTest.LeftVerticalJudge; pCOpticalMachine.RightA = Convert.ToDecimal(opticsTest.RattrA); pCOpticalMachine.RightC = Convert.ToDecimal(opticsTest.RattrC); pCOpticalMachine.RightS = Convert.ToDecimal(opticsTest.RattrS); pCOpticalMachine.RightLevelNum = Convert.ToDecimal(opticsTest.RinPSM); pCOpticalMachine.RightLevelJudge = opticsTest.RightLevelJudge; pCOpticalMachine.RightVerticalNum = Convert.ToDecimal(opticsTest.RupPSM); pCOpticalMachine.RightVerticalJudge = opticsTest.RightVerticalJudge; pCOpticalMachine.Condition = opticsTest.Condition; this._PCDataInput.PCOpticalMachineList.Add(pCOpticalMachine); this.gridControl1.RefreshDataSource(); } //if (opticsTest != null) //{ // Model.PCOpticalMachine pCOpticalMachine = new Book.Model.PCOpticalMachine(); // pCOpticalMachine.PCOpticalMachineId = Guid.NewGuid().ToString(); // pCOpticalMachine.LeftA = Convert.ToDecimal(opticsTest.LattrA); // pCOpticalMachine.LeftC = Convert.ToDecimal(opticsTest.LattrC); // pCOpticalMachine.LeftS = Convert.ToDecimal(opticsTest.LattrS); // pCOpticalMachine.LeftLevelNum = Convert.ToDecimal(opticsTest.LinPSM); // pCOpticalMachine.LeftLevelJudge = opticsTest.LeftLevelJudge; // pCOpticalMachine.LeftVerticalNum = Convert.ToDecimal(opticsTest.LupPSM); // pCOpticalMachine.LeftVerticalJudge = opticsTest.LeftVerticalJudge; // pCOpticalMachine.RightA = Convert.ToDecimal(opticsTest.RattrA); // pCOpticalMachine.RightC = Convert.ToDecimal(opticsTest.RattrC); // pCOpticalMachine.RightS = Convert.ToDecimal(opticsTest.RattrS); // pCOpticalMachine.RightLevelNum = Convert.ToDecimal(opticsTest.RinPSM); // pCOpticalMachine.RightLevelJudge = opticsTest.RightLevelJudge; // pCOpticalMachine.RightVerticalNum = Convert.ToDecimal(opticsTest.RupPSM); // pCOpticalMachine.RightVerticalJudge = opticsTest.RightVerticalJudge; // this._PCDataInput.PCOpticalMachineList.Add(pCOpticalMachine); // 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(); }