Пример #1
0
 public static TacNghiepTinhHinhThucHienResult ToDataResult(this TacNghiep_TinhHinhThucHien entity)
 {
     return(new TacNghiepTinhHinhThucHienResult
     {
         Id = entity.Id,
         MucDoHoanThanhId = entity.MucDoHoanThanhId,
         NgayHoanThanh = entity.NgayHoanThanh,
         MucDoHoanThanhInfo = entity.MucDoHoanThanh.ToIfNotNullDataResult(),
         ThoiGian = entity.ThoiGian,
         CoQuanId = entity.CoQuanId,
         CoQuanInfo = entity.CoQuan.ToDataInfo(),
         TacNghiepId = entity.TacNghiepId,
         TacNghiepInfo = entity.TacNghiep.ToDataInfo(),
         IsDaHoanThanh = (entity.MucDoHoanThanhId == (int)EnumMucDoHoanThanh.DAHOANHTHANH && entity.NgayHoanThanh.HasValue),
         CreateDate = entity.CreateDate,
         CreatedBy = entity.CreatedBy,
         IsDeleted = entity.IsDeleted,
         LastUpdated = entity.LastUpdated,
         LastUpdatedBy = entity.LastUpdatedBy
     });
 }
Пример #2
0
 public static TacNghiepTinhHinhThucHienResult ToIfNotNullDataResult(this TacNghiep_TinhHinhThucHien entity)
 {
     return(entity?.ToDataResult());
 }