コード例 #1
0
 private void addATM_Click(object sender, EventArgs e)
 {
     if (tabChooser == TabChooser.ATM)
     {
         AddNewATM addAtmsPage = new AddNewATM(this);
         addAtmsPage.ShowDialog();
     }
     else if (tabChooser == TabChooser.Cars)
     {
         AddNewCar addCarPage = new AddNewCar(this);
         addCarPage.ShowDialog();
     }
     else if (tabChooser == TabChooser.Employees)
     {
         AddNewEmployee newEmp = new AddNewEmployee(this);
         newEmp.ShowDialog();
     }
 }
コード例 #2
0
 private void updateButton_Click(object sender, EventArgs e)
 {
     if (tabChooser == TabChooser.ATM)
     {
         AddNewATM addAtmsPage =
             new AddNewATM(itemId, selectedAtm.size, selectedAtm.capacity, selectedAtm.brand, addrsId, this, itemId);
         addAtmsPage.ShowDialog();
     }
     else if (tabChooser == TabChooser.Cars)
     {
         AddNewCar addNewCarPage = new AddNewCar(selectedCar, itemId, this);
         addNewCarPage.ShowDialog();
     }
     else if (tabChooser == TabChooser.Employees)
     {
         AddNewEmployee addEmpPage = new AddNewEmployee(selectedEmployee, database.getAddressByID(addrsId), addrsId, this);
         addEmpPage.ShowDialog();
     }
 }