Ejemplo n.º 1
0
 private void buttonSave_Click(object sender, EventArgs e)
 {
     if (control())
     {
         setProperty();
         if (role == "p")
         {
             if (state == "new")
             {
                 PersonelController.createPersonel(name, surname, team, mail, location);
                 this.Close();
             }
             PersonelController.editPersonel(name, surname, mail, team, location);
             this.Close();
         }
         else if (role == "pm")
         {
             if (state == "new")
             {
                 ProjectManagerController.createProjectManager(name, surname, mail, team, location);
                 this.Close();
             }
             ProjectManagerController.editProjectManager(name, surname, mail, team, location);
             this.Close();
         }
         else
         {
             if (state == "new")
             {
                 ManagerController.createManager(name, surname, team, mail, location);
                 this.Close();
             }
             ManagerController.updateManager(name, surname, mail, team, location);
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("Lütfen bütün alanları doldurunuz.");
     }
 }