public void GetAllEmployees(Object sender, EventArgs e)
    {
        EmployeeAdminBO bo = new EmployeeAdminBO();

        _employee_list = bo.GetAllEmployees();
        foreach (EmployeeVO emp in _employee_list)
        {
            Console.WriteLine(emp);
        }
        _next_employee_button.Enabled = true;
    }
    public void DeleteEmployee(Object sender, EventArgs e)
    {
        EmployeeAdminBO bo = new EmployeeAdminBO();

        bo.DeleteEmployee(_emp_vo.EmployeeID);
        _employee_list = bo.GetAllEmployees();
        _next_employee = 0;
        _emp_vo        = null;
        this.ResetEntryFields();
        if (_employee_list.Count > 0)
        {
            _emp_vo = _employee_list[_next_employee];
            this.DisplayEmployeeInfo();
            this.DisplayEmployeeTraining(new EmployeeAdminBO());
            if (_training_list.Count > 0)
            {
                _update_training_button.Enabled = true;
                _next_training_button.Enabled   = true;
                _delete_training_button.Enabled = true;
            }
            else
            {
                _update_training_button.Enabled = false;
                _next_training_button.Enabled   = false;
                _delete_training_button.Enabled = false;
            }
            _delete_employee_button.Enabled = true;
        }
        else
        {
            _delete_employee_button.Enabled = false;
            _delete_training_button.Enabled = false;
            _next_training_button.Enabled   = false;
            _update_training_button.Enabled = false;
            _update_employee_button.Enabled = false;
            _next_employee_button.Enabled   = false;
            this.ResetTrainingTextbox();
        }
    }
Пример #3
0
    public List <EmployeeVO> GetAllEmployees()
    {
        EmployeeAdminBO bo = new EmployeeAdminBO();

        return(bo.GetAllEmployees());
    }