private void btnAdd_Click(object sender, EventArgs e) { AddVehicleInventory frm = new AddVehicleInventory(); frm.ShowDialog(); LoadDefaultValues(); }
private void btnEDIT_Click(object sender, EventArgs e) { var vehicleInventoryID = Convert.ToInt32(dgVehicleInventory.CurrentRow.Cells["VehicleInventoryID"].Value.ToString()); if (vehicleInventoryID == 0) { MyMessageBox.ShowBox("Please select a value from the Vehicle Inventory!!!"); } else { AddVehicleInventory obj = new AddVehicleInventory(vehicleInventoryID, "EDIT"); obj.ShowDialog(); LoadDefaultValues(); } }