private void EditProfileExecute()
 {
     try
     {
         EditEmployee editEmployee = new EditEmployee(Employee);
         editEmployee.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Exemple #2
0
        private void EditCommandExecute()
        {
            try
            {
                EditEmployee editEmployee = new EditEmployee(SelectedEmployee);

                editEmployee.ShowDialog();


                EmployeeList = employeeService.GetAllNonManagerEmployees();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #3
0
        private void EditEmployeeExecute()
        {
            try
            {
                EditEmployee editEmployee = new EditEmployee(SelectedEmployee);
                editEmployee.ShowDialog();


                employees = employeeService.GetEmployees();

                EmployeeList = ConvertToListEmployeeDto(employees);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void EditEmployeeExecute()
        {
            try
            {
                if (Employee != null)
                {
                    EditEmployee editEmployee = new EditEmployee(Employee);
                    editEmployee.ShowDialog();


                    Employees = employeeService.GetAllEmployees().ToList();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void dataGridViewEmployees_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (dataGridViewEmployees.SelectedRows.Count != 0)
                {
                    DAL.Employee emp = (DAL.Employee)bindingSourceEmployees.Current;

                    Forms.EditEmployee f = new EditEmployee(emp, _user, connection);
                    f.Text  = emp.Surname.ToString().Trim().ToUpper() + "     " + emp.OtherNames.ToString().Trim().ToUpper();
                    f.Owner = this;
                    f.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                Utils.ShowError(ex);
            }
        }