예제 #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();
     }
 }