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