예제 #1
0
 public void AddTrail(PMS.Model.DTO.Appraisal.Trail trail)
 {
     if (trail != null)
     {
         if (Lib.Utility.Common.IsNullOrEmptyList(lst_appraisal_trails))
         {
             lst_appraisal_trails = new List <Trail>();
         }
         lst_appraisal_trails.Add(trail);
     }
 }
예제 #2
0
        public static PMS.Model.DTO.Appraisal.Trail MapAppraisalTrailEntityToDTO(PMS.Model.Context.PMS_APPRAISAL_TRAIL entity)
        {
            PMS.Model.DTO.Appraisal.Trail obj_dto = new PMS.Model.DTO.Appraisal.Trail()
            {
                Id = entity.ID,
                Stage = entity.PMS_MST_STAGE == null ? null : MapStageEntityToDTO(entity.PMS_MST_STAGE),
                Action = entity.PMS_MST_ACTION == null ? null : MapActionEntityToDTO(entity.PMS_MST_ACTION),
                ActionTimestamp = entity.ACTION_TIMESTAMP,
                Actioner = entity.ACTION_BY_ID > 0 ? new Model.DTO.Core.Employee(){ Id = Convert.ToInt32(entity.ACTION_BY_ID) } : null
            };

            obj_dto.Appraisal = entity.PMS_APPRAISAL == null ? null : MapAppraisalEntityToDTO(entity.PMS_APPRAISAL, false);

            return obj_dto;
        }