private void btnaddTopo_Click(object sender, EventArgs e) { UCCreatePurchaseOrdersIndividually cpoi = new UCCreatePurchaseOrdersIndividually(); foreach (InventoryRecord ir in sir) { if (ir.QtyToOrder != 0) { ir.ISDeleted = false; ir.ISordered = false; ir.Cost = ir.HideCost * ir.QtyToOrder; ir.ExtendedCost = ir.HideCost * ir.QtyToOrder; sirNew.Add(ir); Inventory.AddToLogAccDB(ir); } } this.Close(); }
void LoadUC() { configuration = new UCConfiguration(); pnlContent.Controls.Add(configuration); configuration.Left = 0; configuration.Top = 0; configuration.BringToFront(); configuration.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; configuration.Visible = false; configuration.f1 = this; CreatePurchaseOrders = new UCCreatePurchaseOrders(); pnlContent.Controls.Add(CreatePurchaseOrders); CreatePurchaseOrders.Left = 0; CreatePurchaseOrders.Top = 0; CreatePurchaseOrders.BringToFront(); // CreatePurchaseOrders.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; CreatePurchaseOrders.Visible = false; CreatePurchaseOrdersIndividually = new UCCreatePurchaseOrdersIndividually(); pnlContent.Controls.Add(CreatePurchaseOrdersIndividually); CreatePurchaseOrdersIndividually.Left = 0; CreatePurchaseOrdersIndividually.Top = 0; CreatePurchaseOrdersIndividually.BringToFront(); // CreatePurchaseOrders.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; CreatePurchaseOrdersIndividually.Visible = false; coniction = new UCConiction(); coniction.Mainfrm = this; pnlContent.Controls.Add(coniction); coniction.Left = 0; coniction.Top = 0; coniction.BringToFront(); coniction.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; coniction.Visible = false; dataLog = new UCDataLog(); dataLog.logdata = datalogObj; dataLog.f1 = this; pnlContent.Controls.Add(dataLog); dataLog.Left = 0; dataLog.Top = 0; dataLog.BringToFront(); dataLog.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; dataLog.Visible = false; scanOUT = new UCScanOUT(); pnlContent.Controls.Add(scanOUT); scanOUT.Left = 0; scanOUT.Top = 0; scanOUT.BringToFront(); scanOUT.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; scanOUT.Visible = false; scanOUT.frmMain = this; scanIN = new UCScanIN(); pnlContent.Controls.Add(scanIN); scanIN.Left = 0; scanIN.Top = 0; scanIN.BringToFront(); scanIN.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; scanIN.Visible = false; scanIN.frmMain = this; purchaseorders = new UCPurchaseOrders(); purchaseorders.frmMain = this; pnlContent.Controls.Add(purchaseorders); purchaseorders.Left = 0; purchaseorders.Top = 0; purchaseorders.BringToFront(); purchaseorders.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; purchaseorders.Visible = false; purchaseorderslog = new UCPurchaseOrdersLog(); purchaseorderslog.frmMain = this; pnlContent.Controls.Add(purchaseorderslog); purchaseorderslog.Left = 0; purchaseorderslog.Top = 0; purchaseorderslog.BringToFront(); purchaseorderslog.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; purchaseorderslog.Visible = false; }