public IDeduction GetAllEmployeeDeductionByEmployeeId(int employeeId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var list = EmployeeDeductionQueries.getAllEmployeeDeductionByEmployeeId(dbContext, employeeId); return(list); } } catch (Exception e) { throw new ArgumentNullException("Get Employee Deduction", e); } }
/// <summary> /// /// </summary> /// <param name="employeeId"></param> /// <returns></returns> public IList <IEmployeeDeduction> GetDeductionByCompanyId(int CompanyId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var list = EmployeeDeductionQueries.getDeductionByCompanyId(dbContext, CompanyId).ToList(); return(list); } } catch (Exception e) { throw new ArgumentNullException("Get Company Deduction", e); } }
/// <summary> /// Gets the employee deduction. /// </summary> /// <param name="employeeId">The employee identifier.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">An Error Occurred" + "Get Employee Deduction By employeeId</exception> public IList <IEmployeeDeduction> GetEmployeeDeduction(int employeeId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var list = EmployeeDeductionQueries.getDeductionByEmployeeId(dbContext, employeeId).ToList(); return(list); } } catch (Exception e) { throw new ArgumentNullException("An Error Occurred" + "Get Employee Deduction By employeeId", e); } }
/// <summary> /// Gets the employee deduction by deduction identifier. /// </summary> /// <param name="deductionId">The deduction identifier.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// deductionId /// or /// Get Employee Deduction By Id /// </exception> public IEmployeeDeduction GetEmployeeDeductionByDeductionId(int deductionId) { if (deductionId <= 0) { throw new ArgumentNullException(nameof(deductionId)); } try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var result = EmployeeDeductionQueries.getEmployeeDeductionByDeductionId(dbContext, deductionId); return(result); } } catch (Exception e) { throw new ArgumentNullException("Get Employee Deduction By Id", e); } }
public IList <IDeduction> GetEmployeeDeductionListByEmployeeDeductionId(int employeeDeductionId) { if (employeeDeductionId < 0) { throw new ArgumentNullException(nameof(employeeDeductionId)); } try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var result = EmployeeDeductionQueries.getEmployeeDeductionListByEmployeeDeductionId(dbContext, employeeDeductionId).ToList(); return(result); } } catch (Exception e) { throw new ArgumentNullException("Get Employee Deduction By Employee DeductionId", e); } }