/// <summary> /// 加载出让合同数据 /// </summary> public ActionResult loadCrhtData(CrhtSearch crhtSearch) { crhtSearch.PageIndex = Convert.ToInt32(Request["page"]); crhtSearch.PageSize = Convert.ToInt32(Request["rows"]); var list = D_RECService.loadCrhtData(crhtSearch); return(Content(SerializeHelper.SerializeToList(crhtSearch.TotalCount, list).Callback())); }
/// <summary> /// 加载出让合同数据 /// </summary> public IQueryable <object> loadCrhtData(CrhtSearch crhtSearch) { var temp = from a in LoadEntities(t => true) join b in CurrentDBSession.TBL_TDTJBG_HTJBXXDal.LoadEntities(t => true) on a.SLID equals b.HTJBXXID join c in CurrentDBSession.TBL_SJSLDDal.LoadEntities(t => true) on a.SJSLDID equals c.SJSLDID join d in CurrentDBSession.OA2_FINSTDal.LoadEntities(t => true) on a.SLID equals d.FI_INST where d.FI_STATE == 1 select new { a.SLID, c.SSXZ, b.DJGH, b.HTBH, b.SRDW, b.TDYT, b.CRMJ, b.CRJKDJ, b.HTQDSJ, b.XMMC, b.ZDBH }; if (!string.IsNullOrEmpty(crhtSearch.XMMC)) { temp = temp.Where(t => t.XMMC.Contains(crhtSearch.XMMC)); } if (!string.IsNullOrEmpty(crhtSearch.DJGH)) { temp = temp.Where(t => t.DJGH.Contains(crhtSearch.DJGH)); } if (!string.IsNullOrEmpty(crhtSearch.SSXZ)) { temp = temp.Where(t => t.SSXZ.Contains(crhtSearch.SSXZ)); } if (!string.IsNullOrEmpty(crhtSearch.ZDBH)) { temp = temp.Where(t => t.ZDBH.Contains(crhtSearch.ZDBH)); } if (!string.IsNullOrEmpty(crhtSearch.HTBH)) { temp = temp.Where(t => t.HTBH.Contains(crhtSearch.HTBH)); } if (!string.IsNullOrEmpty(crhtSearch.TDYT)) { temp = temp.Where(t => t.TDYT.Contains(crhtSearch.TDYT)); } crhtSearch.TotalCount = temp.Count(); return(temp.OrderBy(u => u.SLID).Skip((crhtSearch.PageIndex - 1) * crhtSearch.PageSize).Take(crhtSearch.PageSize)); }