private void btnAdd_Click(object sender, EventArgs e) { AddSparePartsInventoryfrm frm = new AddSparePartsInventoryfrm(); frm.ShowDialog(); LoadDefaultValues(); }
private void btnEDIT_Click(object sender, EventArgs e) { var SparePartsInventoryID = Convert.ToInt32(dgSparePartsInventory.CurrentRow.Cells["SparePartsInventoryID"].Value.ToString()); if (SparePartsInventoryID == 0) { MyMessageBox.ShowBox("Please select a value from the SpareParts Inventory!!!"); } else { AddSparePartsInventoryfrm obj = new AddSparePartsInventoryfrm(SparePartsInventoryID, "EDIT"); obj.ShowDialog(); LoadDefaultValues(); } }
private void btnEditAllotment_Click(object sender, EventArgs e) { if (lstBoxSPInvlist.SelectedIndex == -1) { MyMessageBox.ShowBox("Please select a row from the SpareParts Alloted Inventory!!!"); return; } var selItem = (ComboboxItem)lstBoxSPInvlist.SelectedItem; var SparePartsInventoryID = Convert.ToInt32(selItem.Value); if (SparePartsInventoryID == 0) { MyMessageBox.ShowBox("Please select a value from the SpareParts Inventory!!!"); } else { AddSparePartsInventoryfrm obj = new AddSparePartsInventoryfrm(SparePartsInventoryID, "EDIT"); obj.ShowDialog(); } }