日期:2014-05-20 浏览次数:20903 次
var query = from g in db.graveTemp join a in db.Area on g.fgrid equals a.Id into temp from t in temp.DefaultIfEmpty() join s in db.SubArea on g.subarea equals s.Id into temp1 from t1 in temp1.DefaultIfEmpty() join c in db.Customer on g.gvid equals c.FgrvId into temp3 from t3 in temp3.DefaultIfEmpty() select new { gvid=g.gvid, gno=g.gno, gname=g.gname, areaid=g.fgrid, areaName=t==null?null:t.AreaName, //地区名 kindId=t==null?null:t.FgkID, //类型编号 subAreaId=g.subarea, subAreaName=t1==null?null:t1.SubName, boxes=g.grvboxes, state=t3==null?"否":"是" };