/// <summary> /// Gets all my employee exit. /// </summary> /// <param name="companyId">The company identifier.</param> /// <returns></returns> /// <exception cref="ApplicationException">Repository GetAllMyEmployeeExit</exception> public IList <IEmployeeExit> GetAllMyEmployeeExit(int companyId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var list = ExitManagementQueries.getAllMyEmployeeExit(dbContext, companyId).ToList(); return(list); } } catch (Exception e) { throw new ApplicationException("Repository GetAllMyEmployeeExit", e); } }
/// <summary> /// Gets the employee exit by employee identifier. /// </summary> /// <param name="employeeeId">The employeee identifier.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">GetEmployeeExitByEmployeeId</exception> public IEmployeeExit GetEmployeeExitByEmployeeId(int employeeeId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var result = ExitManagementQueries.getEmployeeExitByEmployeeId(dbContext, employeeeId); return(result); } } catch (Exception e) { throw new ArgumentNullException("GetEmployeeExitByEmployeeId", e); } }