Ejemplo n.º 1
0
        /// <summary>
        /// 加载已供地报批项目列表
        /// </summary>
        public ActionResult ShowList(YgdbpxmSearch ygdbpxmSearch)
        {
            ygdbpxmSearch.PageIndex = Convert.ToInt32(Request["page"]);
            ygdbpxmSearch.PageSize  = Convert.ToInt32(Request["rows"]);
            var list = D_RECService.LoadSerachEntities(ygdbpxmSearch);

            return(Content(SerializeHelper.SerializeToList(ygdbpxmSearch.TotalCount, list).Callback()));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 加载已供地报批项目数据
        /// </summary>
        public IQueryable <object> LoadSerachEntities(YgdbpxmSearch ygdbpxmSearch)
        {
            var temp = from a in LoadEntities(t => true)
                       join b in CurrentDBSession.TBL_TDFHDJ_BPPDDal.LoadEntities(t => true)
                       on a.SLID equals b.ID
                       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.XMMC,
                b.ZMJ,
                b.XMLX,
                b.PZWH,
                b.PZRQ,
                b.PZDW,
                b.GWYPFWH,
                b.GWYPFRQ,
                b.GWYPFBSMJ,
                b.JSXMBH
            };

            if (!string.IsNullOrEmpty(ygdbpxmSearch.SSXZ))
            {
                temp = temp.Where(t => t.SSXZ.Contains(ygdbpxmSearch.SSXZ));
            }
            if (!string.IsNullOrEmpty(ygdbpxmSearch.XMMC))
            {
                temp = temp.Where(t => t.XMMC.Contains(ygdbpxmSearch.XMMC));
            }
            if (!string.IsNullOrEmpty(ygdbpxmSearch.PZWH))
            {
                temp = temp.Where(t => t.PZWH.Contains(ygdbpxmSearch.PZWH));
            }
            ygdbpxmSearch.TotalCount = temp.Count();
            return(temp.OrderBy(u => u.SLID).Skip((ygdbpxmSearch.PageIndex - 1) * ygdbpxmSearch.PageSize).Take(ygdbpxmSearch.PageSize));
        }