public void AddApprover(PMS.Model.DTO.Appraisal.Approver approver) { if (approver != null) { if (Lib.Utility.Common.IsNullOrEmptyList(lst_approvers)) { lst_approvers = new List <Approver>(); } lst_approvers.Add(approver); } }
public PMS.Model.DTO.Appraisal.Approver GetApproverByLevel(int level) { PMS.Model.DTO.Appraisal.Approver obj_approver = null; if (!Lib.Utility.Common.IsNullOrEmptyList(lst_approvers)) { var approvers = lst_approvers.Where(a => a.ApprovalLevel == level); if (!Lib.Utility.Common.IsNullOrEmptyList(approvers)) { obj_approver = approvers.First(); } } return(obj_approver); }
public static PMS.Model.DTO.Appraisal.Approver MapEmployeeDTOToApproverDTO(PMS.Model.DTO.Core.Employee employeeDTO, int approvalLevel) { PMS.Model.DTO.Appraisal.Approver obj_dto = new PMS.Model.DTO.Appraisal.Approver() { EmployeeId = employeeDTO.Id, FirstName = employeeDTO.FirstName, LastName = employeeDTO.LastName, PreferredName = employeeDTO.PreferredName, OfficeEmailAddress = employeeDTO.OfficeEmailAddress, ApprovalLevel = approvalLevel }; return obj_dto; }
public static PMS.Model.DTO.Appraisal.Approver MapApproverEntityToDTO(PMS.Model.Context.PMS_APPRAISAL_APPROVER entity) { PMS.Model.DTO.Appraisal.Approver obj_dto = new PMS.Model.DTO.Appraisal.Approver() { Id = entity.ID, EmployeeId = entity.EMPLOYEE.ID, ApprovalLevel = entity.APPROVAL_LEVEL, FirstName = entity.EMPLOYEE.FIRST_NAME, LastName = entity.EMPLOYEE.LAST_NAME, PreferredName = entity.EMPLOYEE.PREFERRED_NAME, DomainId = entity.EMPLOYEE.DOMAIN_ID, OfficeEmailAddress = entity.EMPLOYEE.OFFICE_EMAIL_ADDRESS }; obj_dto.Appraisal = entity.PMS_APPRAISAL == null ? null : MapAppraisalEntityToDTO(entity.PMS_APPRAISAL, false); return obj_dto; }