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 }); }
public static HoSoCongViecInfo ToDataInfo(this HoSoCongViec entity) { return(new HoSoCongViecInfo { Id = entity.Id, NgayHetHan = entity.NgayHetHan, TrangThai = entity.TrangThaiCongViec.ToIfNotNullDataInfo(), NoiDung = entity.NoiDung }); }
public static HoSoCongViecInfo ToIfNotNullDataInfo(this HoSoCongViec entity) { return(entity?.ToDataInfo()); }
public static HoSoCongViecResult ToIfNotNullDataResult(this HoSoCongViec entity) { return(entity?.ToDataResult()); }