public PoItemsDialog(PurchaseOrderItems item,frmPurchaseOrder PoUI) { this.PoItems = item; this.POUI = PoUI; InitializeComponent(); SetValues(); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PoItemsDialog_FormClosing); }
private PurchaseOrderItems AssignPoItems() { try { PurchaseOrderItems _PoItems = new PurchaseOrderItems(); _PoItems.PurchaseOrderID = txtPoNo.Text; _PoItems.Color = txtColorCode.Text; _PoItems.Size = txtSize.Text; _PoItems.Length = txtLength.Text; _PoItems.Quantity = Convert.ToInt16(txtQuntity.Text); _PoItems.PurchaseOrderHeaderID = _PoItems.PurchaseOrderID; return _PoItems; } catch(Exception ex){ MessageBox.Show(ex.Message, "Error - B-0002", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } }