Ejemplo n.º 1
0
        public ActionResult LoadEntryList()
        {
            //统计时间
            DateTime StartDate = Convert.ToDateTime(Request.Form["StartDate"]);
            DateTime EndDate = Convert.ToDateTime(Request.Form["EndDate"]);
            string EntryCode = Request.Form["EntryCode"].ToString();
            string EntryType = Request.Form["EntryType"].ToString();
            string StroageID = Request.Form["StroageID"].ToString();
            List<int> StroageIDs = new List<int>();
            if (StroageID.Length > 0)
                StroageIDs.Add(int.Parse(StroageID));
            else
                StroageIDs = UserOperateContext.Current.Session_StorageRelated.listUserStorage;

            //获取页容量
            int pageSize = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageIndex = int.Parse(Request.Form["page"]);

            I_EntryBLL bll = new I_EntryBLL();
            int total = 0;
            var list = bll.GetEntryList(pageIndex, pageSize, ref total, StartDate, EndDate, EntryCode, EntryType, StroageIDs);
            return Json(new { total = total, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet);
            //return Json(null, "appliction/json", JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 2
0
        public ActionResult LoadEntryList()
        {
            //统计时间
            DateTime   StartDate  = Convert.ToDateTime(Request.Form["StartDate"]);
            DateTime   EndDate    = Convert.ToDateTime(Request.Form["EndDate"]);
            string     EntryCode  = Request.Form["EntryCode"].ToString();
            string     EntryType  = Request.Form["EntryType"].ToString();
            string     StroageID  = Request.Form["StroageID"].ToString();
            List <int> StroageIDs = new List <int>();

            if (StroageID.Length > 0)
            {
                StroageIDs.Add(int.Parse(StroageID));
            }
            else
            {
                StroageIDs = UserOperateContext.Current.Session_StorageRelated.listUserStorage;
            }

            //获取页容量
            int pageSize = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageIndex = int.Parse(Request.Form["page"]);

            I_EntryBLL bll   = new I_EntryBLL();
            int        total = 0;
            var        list  = bll.GetEntryList(pageIndex, pageSize, ref total, StartDate, EndDate, EntryCode, EntryType, StroageIDs);

            return(Json(new { total = total, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet));
            //return Json(null, "appliction/json", JsonRequestBehavior.AllowGet);
        }