private void BtnAdd_Click(object sender, EventArgs e) { frmMaintainVehicles Vehicles = new frmMaintainVehicles(); // frmParent frmParent = Users; // Users.MdiParent = frmParent; Vehicles.ShowDialog(); }
private void AddNewVehicleToolStripMenuItem_Click(object sender, EventArgs e) { frmMaintainVehicles vehicle = new frmMaintainVehicles(); frmParent parent = this; vehicle.setMode("add"); vehicle.clearForm(); vehicle.MdiParent = parent; vehicle.Show(); }
private void BtnAdd_Click(object sender, EventArgs e) { frmMaintainVehicles vehicle = new frmMaintainVehicles(); // frmParent frmParent = Users; // Users.MdiParent = frmParent; vehicle.setMode("add"); vehicle.clearForm(); vehicle.ShowDialog(); }
private void BtnUpdate_Click(object sender, EventArgs e) { frmMaintainVehicles maintainVehicles = new frmMaintainVehicles(); maintainVehicles.setMode("update"); maintainVehicles.clearForm(); maintainVehicles.setRegNo(dgVehicles.Rows[rowIndex].Cells[1].Value.ToString()); try { maintainVehicles.setVehicleID(dgVehicles.Rows[rowIndex].Cells[0].Value.ToString()); } catch (ArgumentOutOfRangeException m) { Console.WriteLine(m.Message); } maintainVehicles.Show(); }