Пример #1
0
        /// <summary>
        /// 加载划拨决定书数据
        /// </summary>
        public ActionResult loadHbjdsData(HbjdsSearch hbjdsSearch)
        {
            hbjdsSearch.PageIndex = Convert.ToInt32(Request["page"]);
            hbjdsSearch.PageSize  = Convert.ToInt32(Request["rows"]);
            var list = D_RECService.loadHbjdsData(hbjdsSearch);

            return(Content(SerializeHelper.SerializeToList(hbjdsSearch.TotalCount, list).Callback()));
        }
Пример #2
0
        /// <summary>
        /// 加载划拨决定书数据
        /// </summary>
        public IQueryable <object> loadHbjdsData(HbjdsSearch hbjdsSearch)
        {
            var temp = from a in LoadEntities(t => true)
                       join b in CurrentDBSession.TBL_TDGY_HBJDSDal.LoadEntities(t => true)
                       on a.HBJDSID equals b.HBJDSID
                       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.DZJGH,
                b.PZWH,
                b.ZDYT,
                b.HBZDMJ,
                b.HBJK,
                b.HBJDSWH,
                b.ZDBH,
                b.HBJDSID,
                b.HBJDSQDSJ
            };

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