public void AddAppraisalSection(PMS.Model.DTO.Appraisal.Section appraisalSection) { if (appraisalSection != null) { if (Lib.Utility.Common.IsNullOrEmptyList(lst_appraisal_stages)) { lst_appraisal_sections = new List <Section>(); } lst_appraisal_sections.Add(appraisalSection); } }
public static PMS.Model.DTO.Appraisal.Section MapAppraisalSectionEntityToDTO(PMS.Model.Context.PMS_APPRAISAL_SECTION entity, bool mapChildEntities) { PMS.Model.DTO.Appraisal.Section obj_dto = new PMS.Model.DTO.Appraisal.Section() { Id = entity.ID, SectionId = entity.PMS_MST_SECTION.ID, SelfScore = entity.SELF_SCORE, Level1Score = entity.LEVEL_1_SCORE, Level2Score = entity.LEVEL_2_SCORE, FinalScore = entity.FINAL_SCORE, Description = entity.PMS_MST_SECTION.DESCRIPTION, Active = entity.PMS_MST_SECTION.ACTIVE, Name = entity.PMS_MST_SECTION.NAME }; obj_dto.Appraisal = entity.PMS_APPRAISAL == null ? null : MapAppraisalEntityToDTO(entity.PMS_APPRAISAL, false); if (mapChildEntities) { obj_dto.Comments = Lib.Utility.Common.IsNullOrEmptyList(entity.PMS_APPRAISAL_SECTION_COMMENT) == true ? null : MapAppraisalSectionCommentEntitiesToDTOs(entity.PMS_APPRAISAL_SECTION_COMMENT.ToList()); } return obj_dto; }