public EntityListResult<Employees> FindByDeptCode(string deptCode) { EmployeesDomain employeesDomain = new EmployeesDomain(1, ATSCommon.Enums.LanguagesEnum.Arabic); EntityListResult<Employees> entityListResult = new EntityListResult<Employees>(); try { entityListResult.ReturnedEntities = employeesDomain.FindByDeptCode(deptCode); if (employeesDomain.ActionState.Status != ATSCommon.Enums.ActionStatusEnum.NoError) { entityListResult.Message = employeesDomain.ActionState.Result; } } catch (Exception ex) { entityListResult.Message = ex.Message; } return entityListResult; }
public EntityResult<Employees> FindByID(int entityID) { EntityResult<Employees> entityResult = new EntityResult<Employees>(); EmployeesDomain employeesDomain = new EmployeesDomain(1, ATSCommon.Enums.LanguagesEnum.Arabic); try { entityResult.ReturnedEntity = employeesDomain.FindByID(entityID); if (employeesDomain.ActionState.Status != ATSCommon.Enums.ActionStatusEnum.NoError) { entityResult.Message = employeesDomain.ActionState.Result; } } catch (Exception ex) { entityResult.Message = ex.Message; } return entityResult; }