public void AddCoreValue(PMS.Model.DTO.Appraisal.CoreValue coreValue) { if (coreValue != null) { if (Lib.Utility.Common.IsNullOrEmptyList(lst_core_values)) { lst_core_values = new List <CoreValue>(); } lst_core_values.Add(coreValue); } }
public static PMS.Model.DTO.Appraisal.CoreValue MapAppraisalCoreValueEntityToDTO(PMS.Model.Context.PMS_APPRAISAL_CORE_VALUE entity, bool mapChildEntities) { PMS.Model.DTO.Appraisal.CoreValue obj_dto = new PMS.Model.DTO.Appraisal.CoreValue() { Id = entity.ID, //Section = MapSectionEntityToDTO(entity.PMS_MST_SECTION, true), Block = MapBlockEntityToDTO(entity.PMS_MST_BLOCK), //CoreValueCompetency = MapCoreValueCompetencyEntityToDTO(entity.PMS_MST_CORE_VALUE_COMPETENCY), Target = entity.TARGET, Progress = entity.PROGRESS_UPDATE, SelfScore = entity.SELF_SCORE, Level1Score = entity.LEVEL_1_SCORE, Level2Score = entity.LEVEL_2_SCORE, FinalScore = entity.FINAL_SCORE }; 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_CORE_VALUE_COMMENT) == true ? null : MapAppraisalCoreValueCommentEntitiesToDTOs(entity.PMS_APPRAISAL_CORE_VALUE_COMMENT.ToList()); } return obj_dto; }