博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linq-C#左连接
阅读量:6825 次
发布时间:2019-06-26

本文共 4276 字,大约阅读时间需要 14 分钟。

var list = (from dr in dt_project.AsEnumerable()                        join d1 in list_businessclass on dr.Field
("BusinessClass") equals d1.ID into temp0 from tp0 in temp0.DefaultIfEmpty() join d2 in list_dic_ppmodle on dr.Field
("SanctionPPMode") equals d2.ID into temp1 from tp1 in temp1.DefaultIfEmpty() join d3 in list_dic_ppmodle on dr.Field
("RealPPMode") equals d3.ID into temp2 from tp2 in temp2.DefaultIfEmpty() select new { ProjectID = dr.Field
("ProjectID"), ResponsibleUnit = dr.Field
("ResponsibleUnit"), OwnerUnitName = dr.Field
("OwnerUnitName"),//, ProjectName = dr.Field
("ProjectName"), BusinessClass = dr.Field
("BusinessClass"), BusinessClassText = (tp0 == null ? "" : tp0.Title), //设立 EstablishedTime = dr.Field
("EstablishedTime") == null ? "" : Convert.ToDateTime(dr.Field
("EstablishedTime")).ToString("yyyy-MM-dd"),//立项时间 EstablishReplyCode = dr.Field
("EstablishReplyCode"),//立项批复文号 EstablishReplyCodeAttach = dr.Field
("EstablishReplyCodeAttach"),//立项批复文号附件 //可研 FeasibilityStudyReplyTime = dr.Field
("FeasibilityStudyReplyTime") == null ? "" : Convert.ToDateTime(dr.Field
("FeasibilityStudyReplyTime")).ToString("yyyy-MM-dd"),//可研批复时间 FeasibilityStudyReplyCode = dr.Field
("FeasibilityStudyReplyCode"),//可研批复文号 FeasibilityStudyReplyCodeAttach = dr.Field
("FeasibilityStudyReplyCodeAttach"),//可研批复文号附件 //概算 ApproximateReplyTime = dr.Field
("ApproximateReplyTime") == null ? "" : Convert.ToDateTime(dr.Field
("ApproximateReplyTime")).ToString("yyyy-MM-dd"),//概算批复时间 ApproximateReplyCode = dr.Field
("ApproximateReplyCode"),//概算批准文号 ApproximateReplyCodeAttach = dr.Field
("ApproximateReplyCodeAttach"),//概算批准文号附件 ApproximateExamApprovalMoney = dr.Field
("ApproximateExamApprovalMoney") ?? 0,//概算审批金额 //招投标项目信息核准招标方式表 ApprovedInviteBidModeTime = dr.Field
("ApprovedInviteBidModeTime") == null ? "" : Convert.ToDateTime(dr.Field
("ApprovedInviteBidModeTime")).ToString("yyyy-MM-dd"),//核准招标方式时间 ApprovedInviteBidModeCode = dr.Field
("ApprovedInviteBidModeCode"),//核准招标方式文号 ApprovedInviteBidModeMoney = dr.Field
("ApprovedInviteBidModeMoney") ?? 0,//招标方式核准金额 ApprovedInviteBidModeBasisAttach = dr.Field
("ApprovedInviteBidModeBasisAttach"),//上传核准招标方式依据文件 IsEvaluate = dr.Field
("IsEvaluate") ?? false,//项目投资是否评审 ApprovedInviteBidModeBasis = dr.Field
("ApprovedInviteBidModeBasis"),//上传核准招标方式依据 //招投标项目信息结算表 FinalAccountMoney = dr.Field
("FinalAccountMoney") ?? 0,//决算金额 ApproximateExecMoney = dr.Field
("ApproximateExecMoney") ?? 0,//执行金额 IsExceedApproximate = dr.Field
("IsExceedApproximate") ?? false,//是否超出概算 ExceedApproximateMoney = dr.Field
("ExceedApproximateMoney") ?? 0,//超出概算金额 // PackageID = dr.Field
("PackageID"),//包类型 PackageClassID = dr.Field
("PackageClassID"),//包类型 EngineeringName = dr.Field
("EngineeringName"), AgencyName = dr.Field
("AgencyName"), InviteSchemeSancDept = dr.Field
("InviteSchemeSancDept"), SanctionPPMode = dr.Field
("SanctionPPMode"), SanctionPPModeText = (tp1 == null ? "" : tp1.Title), RealPPMode = dr.Field
("RealPPMode"), RealPPModeText = (tp2 == null ? "" : tp2.Title), PPChangeSancDept = dr.Field
("PPChangeSancDept"), PPChangeReason = dr.Field
("PPChangeReason"), PPChangeBasis = dr.Field
("PPChangeBasis"), PPChangeBasisAttach = dr.Field
("PPChangeBasisAttach"), Media = b_common.TranslateMedia(list_media, dr.Field
("Media")), //3 SignedContractTime = dr.Field
("SignedContractTime") == null ? "" : Convert.ToDateTime(dr.Field
("SignedContractTime")).ToString("yyyy-MM-dd"), SignedContractMoney = dr.Field
("SignedContractMoney") ?? 0, ExecuteUnit = dr.Field
("ExecuteUnit"), //3 SettlementMoney = dr.Field
("SettlementMoney") ?? 0, IsExceedApproximateForPackage = dr.Field
("IsExceedApproximateForPackage") ?? false, ExceedApproximateBasis = dr.Field
("ExceedApproximateBasis"), ExceedApproximateBasisAttach = dr.Field
("ExceedApproximateBasisAttach"), Note = dr.Field
("Note") } ).ToList();

 

转载于:https://www.cnblogs.com/yongtaiyu/p/4647834.html

你可能感兴趣的文章
虚拟机CentOS6.5网络配置
查看>>
bzoj2563 阿狸和桃子的游戏
查看>>
概念整理3
查看>>
《Hadoop基础教程》之初识Hadoop
查看>>
转:前端单元测试总结
查看>>
【LeetCode每天一题】 Intersection of Two Linked Lists(两个链表的入口节点)
查看>>
spring mvc 用ajaxSubmit 在iE8上传文件变下载的问题
查看>>
Nginx 负载均衡动静分离配置
查看>>
laravel, Composer和autoloading
查看>>
D3 JS study notes
查看>>
算法整理-二叉树和堆栈
查看>>
如何设计一个“高大上”的 logo
查看>>
clustalo安装
查看>>
[日常] Go语言圣经--示例: 并发的Clock服务习题
查看>>
个人总结8
查看>>
SCUT个人整理的常见问题
查看>>
二十二、Command 命令模式
查看>>
HDU Just a Hook
查看>>
什么是webpack?
查看>>
20165206学习基础和C语言基础调查
查看>>