private void bbiSplitPart_ItemClick(object sender, ItemClickEventArgs e) { InvoiceBodyData obj = gridView.GetFocusedRow() as InvoiceBodyData; DialogResult r; if (obj.PartRmCtn < 1) { r = XtraMessageBox.Show($"ยืนยันคำสั่ง Split {obj.PartNo}", "XPW Alert!", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (r == DialogResult.OK) { spobj.Add(obj); gridView.DeleteSelectedRows(); } } else { XtraMessageBox.Show($"ไม่สามารถ Split {obj.PartNo} ได้\nเนื่องจากทำการจัดเตรียมแล้ว", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error); } if (spobj.Count > 0) { bbiNewOrder.Enabled = true; bbiSplitInvoice.Caption = $"Split {spobj.Count}"; } else { bbiNewOrder.Enabled = false; bbiSplitInvoice.Caption = $""; } }
private void bbiPrintAllShipingLabel_ItemClick(object sender, ItemClickEventArgs e) { DialogResult r = XtraMessageBox.Show("คุณต้องการที่จะปริ้น Shipping Label ใช่หรือไม่", "ยืนยันคำสั่ง", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (r == DialogResult.Yes) { bool checkinv = new InvoiceControllers().CheckInvoiceStatus(ob.RefInv); if (checkinv) { List <InvoiceBodyData> obj = gridControl.DataSource as List <InvoiceBodyData>; SplashScreenManager.ShowDefaultWaitForm(); int i = 0; while (i < obj.Count) { InvoiceBodyData j = obj[i]; bool plabel = new InvoiceControllers().PrintFTicket(j.RefInv, j.PartNo, j.OrderNo, j.StartFticket, j.StartFticket.ToString()); if (plabel) { i++; } } XtraMessageBox.Show("ปริ้นข้อมูลเสร็จแล้ว"); } else { XtraMessageBox.Show("กรุณาทำการยืนยัน Invoice ก่อน", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void gridView_DoubleClick(object sender, EventArgs e) { try { InvoiceBodyData obj = gridView.GetFocusedRow() as InvoiceBodyData; InvoiceJobCardForm frm = new InvoiceJobCardForm(obj, true); frm.ShowDialog(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private void bbiShipingPart_ItemClick(object sender, ItemClickEventArgs e) { try { InvoiceBodyData obj = gridView.GetFocusedRow() as InvoiceBodyData; InvoiceJobCardForm frm = new InvoiceJobCardForm(obj, true); frm.ShowDialog(); ReloadData(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public OrderEditCustomerForm(List <InvoiceBodyData> obj) { InitializeComponent(); string potype = "ALL"; ob = obj[0]; switch (obj[0].Combinv) { case "E": potype = "3 END"; break; case "F": potype = "3 FRIST"; break; default: break; } bbiPoType.EditValue = potype; }
private void bbiAddShorting_ItemClick(object sender, ItemClickEventArgs e) { var result = XtraInputBox.Show("ระบุจำนวนที่ต้องการตัด Short", "Comfirm Shorting", "0"); try { var remctn = gridView.GetFocusedRowCellValue("RemCtn").ToString(); var oldctn = gridView.GetFocusedRowCellValue("ShCtn").ToString(); int shctn = int.Parse(result) + int.Parse(oldctn); if (int.Parse(result) > int.Parse(remctn)) { XtraMessageBox.Show("กรุณาระบุจำนวนให้น้อยกว่าหรือเท่ากับ REMAIN", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else if (int.Parse(result) <= 0) { XtraMessageBox.Show("ระบุจำนวนให้ถูกต้องด้วย", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { InvoiceBodyData o = gridView.GetFocusedRow() as InvoiceBodyData; o.ShCtn = shctn; string upbody = $"UPDATE TXP_ISSTRANSBODY b SET b.SHORDERQTY={shctn}*b.STDPACK,b.UPDDTE = sysdate " + $"WHERE b.ISSUINGKEY = '{o.RefNo}' AND b.PONO = '{o.OrderNo}' AND b.PARTNO = '{o.PartNo}'"; shlist.Add(o); gridView.SetFocusedRowCellValue("RemCtn", (int.Parse(remctn) - int.Parse(result))); gridView.RefreshData(); } } catch (Exception) { XtraMessageBox.Show("ระบุจำนวนให้ถูกต้องด้วย", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (shlist.Count > 0) { bbiConfirmShort.Enabled = true; } }
public InvoiceJobCardForm(InvoiceBodyData obj, bool all) { InitializeComponent(); SplashScreenManager.ShowDefaultWaitForm(); ob = obj; bbiJobCardOnly.Enabled = true; //new SetPalletControllers().RunningSeq(ob.RefInv); if (StaticFunctionData.Factory == "AW") { gridView.OptionsSelection.MultiSelect = false; bbiJobCardOnly.Enabled = false; } if (all) { ShowFTicketAll(); } else { ShowFTicketByPart(); } SplashScreenManager.CloseDefaultWaitForm(); }