예제 #1
0
 public static HoSoCongViecResult ToDataResult(this HoSoCongViec entity)
 {
     return(new HoSoCongViecResult
     {
         Id = entity.Id,
         NoiDung = entity.NoiDung,
         NgayHetHan = entity.NgayHetHan,
         NgayTao = entity.NgayTao,
         TrangThaiCongViecId = entity.TrangThaiCongViecId,
         TrangThaiCongViecInfo = entity.TrangThaiCongViec.ToIfNotNullDataInfo(),
         LinhVucCongViecId = entity.LinhVucCongViecId,
         LinhVucCongViec = entity.LinhVucCongViec.ToDataInfo(),
         DanhGiaCongViec = entity.DanhGiaCongViec,
         UserPhuTrachId = entity.UserPhuTrachId,
         UserPhuTrach = entity.User.ToDataInfo(),
         UserXuLyId = entity.UserXuLyId,
         UserXyLy = entity.User1.ToDataInfo(),
         CongViecPhoiHopResult = entity.CongViec_PhoiHop.Where(x => !x.IsDeleted).Select(x => x.ToDataResult()).ToList(),
         CongViecQuaTrinhXuLyResult = entity.CongViec_QuaTrinhXuLy.Where(x => !x.IsDeleted).Select(x => x.ToDataResult()).ToList(),
         CongViecVanBanResults = entity.CongViec_VanBan.Where(x => !x.IsDeleted).Select(x => x.ToDataResult()).ToList(),
         CreateDate = entity.CreateDate,
         CreatedBy = entity.CreatedBy,
         IsDeleted = entity.IsDeleted,
         LastUpdated = entity.LastUpdated,
         LastUpdatedBy = entity.LastUpdatedBy
     });
 }
예제 #2
0
 public static HoSoCongViecInfo ToDataInfo(this HoSoCongViec entity)
 {
     return(new HoSoCongViecInfo
     {
         Id = entity.Id,
         NgayHetHan = entity.NgayHetHan,
         TrangThai = entity.TrangThaiCongViec.ToIfNotNullDataInfo(),
         NoiDung = entity.NoiDung
     });
 }
예제 #3
0
 public static HoSoCongViecInfo ToIfNotNullDataInfo(this HoSoCongViec entity)
 {
     return(entity?.ToDataInfo());
 }
예제 #4
0
 public static HoSoCongViecResult ToIfNotNullDataResult(this HoSoCongViec entity)
 {
     return(entity?.ToDataResult());
 }