//Method for clicking the link to edit order private void inventoryTable_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 7) { long orderid = (long)inventoryTable.Rows[e.RowIndex].Cells[6].Value; var getTranstype = db.Orders.Where(order => order.ID == orderid).FirstOrDefault().TransactionTypeID; if (getTranstype == 1) { PurchaseOrder purchaseOrderedit = new PurchaseOrder(true, orderid); purchaseOrderedit.ShowDialog(); } else if (getTranstype == 2) { WarehouseManagement warehousemanagementedit = new WarehouseManagement(true, orderid); warehousemanagementedit.ShowDialog(); } load_Inventory(); } }
//Adding Warehouse Management Order private void WMlink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { WarehouseManagement nWM = new WarehouseManagement(false, null); nWM.ShowDialog(); }