コード例 #1
0
 public List <Employee> FetchEmployeeByDepartment(int departmentId)
 {
     try
     {
         employeeDataAccessComponent = new EmployeeDataAccessComponent();
         return(employeeDataAccessComponent.GetEmployeeFromADepartment(departmentId));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 public int RemoveEmployee(int employeeId)
 {
     try
     {
         employeeDataAccessComponent =
             new EmployeeDataAccessComponent();
         return(employeeDataAccessComponent.DeleteEmployeeRecord(employeeId));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
 public int AddNewEmployee(Employee employee)
 {
     try
     {
         employeeDataAccessComponent = new EmployeeDataAccessComponent();
         int result = employeeDataAccessComponent.InsertEmployeeRecord(employee);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 public int UpdateEmployee(Employee employee)
 {
     try
     {
         employeeDataAccessComponent =
             new EmployeeDataAccessComponent();
         int result = employeeDataAccessComponent
                      .ModifyEmployeeRecord(employee);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }