Beispiel #1
0
 private void btnPromote_Click(object sender, EventArgs e)
 {
     if (InputServices.ComboBoxError(cmbbxDepartments, errorProvider1))
     {
         employeeService.PromoteEmployeeToManager(SelectedUser.Id, cmbbxDepartments.SelectedItem as Department);
         CloseDialog();
     }
 }
Beispiel #2
0
        private void editAccount_btn_Click(object sender, EventArgs e)
        {
            if (InputServices.TextBoxError(name_txtbx, errorProvider1) && InputServices.TextBoxError(lastName_txtbx, errorProvider1) &&
                InputServices.ComboBoxError(cmbbxDepartment, errorProvider1))
            {
                ChangeSelectedUser(SelectedUser);

                CloseDialog();
            }
        }
Beispiel #3
0
 private void createAccount_btn_Click(object sender, EventArgs e)
 {
     if (InputServices.TextBoxError(username_txtbx, errorProvider1) && InputServices.TextBoxError(password_txtbx, errorProvider1) &&
         InputServices.TextBoxError(name_txtbx, errorProvider1) && InputServices.TextBoxError(lastName_txtbx, errorProvider1) &&
         InputServices.ComboBoxError(department_combobx, errorProvider1))
     {
         Department department = department_combobx.SelectedItem as Department;
         accountService.AddNewUser(username_txtbx.Text, password_txtbx.Text, name_txtbx.Text, lastName_txtbx.Text, dayOfBirth_pckr.Value, GenderChoice(), department);
         Hide();
         var mainForm = new MainForm();
         mainForm.ShowDialog();
         Close();
     }
 }