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();
        }
    }
Example #2
0
    public void DeleteEmployee(Guid employeeID)
    {
        EmployeeAdminBO bo = new EmployeeAdminBO();

        bo.DeleteEmployee(employeeID);
    }