/// <summary>
 /// Unique constructor to generate the absence WinForm
 /// </summary>
 /// <param name="controlMyApp">instance of the controller class</param>
 /// <param name="employee">instance of the corresponding employee</param>
 public FrmManageAbsence(ControlMyApp controlMyApp, Employee employee)
 {
     InitializeComponent();
     _controlMyApp = controlMyApp;
     Init(employee);
     _employee = employee;
 }
Esempio n. 2
0
        private void AddEmployee()
        {
            int newEmployeeID = ControlMyApp.GetMaxEmployeeID() + 1;

            controlMyApp.AddEmployee(newEmployeeID,
                                     textBoxFamilyName.Text,
                                     textBoxFirstName.Text,
                                     textBoxPhone.Text,
                                     textBoxMail.Text,
                                     comboBoxDepartment.SelectedIndex + 1,
                                     comboBoxDepartment.Text);

            FillEmployeesList();
        }
Esempio n. 3
0
 /// <summary>
 /// Constructor of the FrmAuthentification
 /// Instance of the class Control saved has a field
 /// </summary>
 /// <param name="controlMyApp">instance of the class Control</param>
 public FrmAuthentification(ControlMyApp controlMyApp)
 {
     InitializeComponent();
     this.controlMyApp      = controlMyApp;
     BtnConnexion.BackColor = Color.Aquamarine;
 }
Esempio n. 4
0
 /// <summary>
 /// Initialization of the graphic interface
 /// Recovery of the controler
 /// </summary>
 /// <param name="controlMyApp">controler of the connexion</param>
 public FrmEmployee(ControlMyApp controlMyApp)
 {
     InitializeComponent();
     this.controlMyApp = controlMyApp;
     Init();
 }