public ActionResult DataLoad()
        {
            //统计时间
            DateTime StartDate = Convert.ToDateTime(Request.Form["StartDate"]); //查询起时间 单一参数
            DateTime EndDate = Convert.ToDateTime(Request.Form["EndDate"]); //查询止时间 单一参数
            string DeliveryCode = Request.Form["DeliveryCode"].ToString();//出库单号 单一参数
            string DeliveryType = Request.Form["DeliveryType"].ToString();  //出库类型 单一参数

            string SelectStorage = Request.Form["SelectStorage"].ToString(); //来源仓库编码
            List<int> listSourceStroageIDs = new List<int>();
            if (SelectStorage.Length > 0)
                listSourceStroageIDs.Add(int.Parse(SelectStorage));
            else
                listSourceStroageIDs = UserOperateContext.Current.Session_StorageRelated.listUserStorage;

            string TargetStorage = Request.Form["TargetStorage"].ToString(); //目标仓库编码
            List<int> listTargetStorageIDs = null;
            if (TargetStorage != "")
                listTargetStorageIDs = TargetStorage.Split(',').Select<string, int>(e => Convert.ToInt32(e)).ToList();

            string MaterialType = Request.Form["MaterialType"].ToString();
            List<string> mTypeList = UserOperateContext.Current.getMaterialTypeList(MaterialType);
            string MaterialID = Request.Form["MaterialID"].ToString();

            //获取页容量
            int pageSize = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageIndex = int.Parse(Request.Form["page"]);
            int total = 0;
            var list = new I_DeliveryBLL().GetDeliveryList(pageIndex, pageSize, ref total, StartDate, EndDate, DeliveryCode, DeliveryType, listSourceStroageIDs, listTargetStorageIDs, mTypeList, MaterialID);
            return Json(new { total = total, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet);
        }
Esempio n. 2
0
        public ActionResult DataLoad()
        {
            //统计时间
            DateTime StartDate    = Convert.ToDateTime(Request.Form["StartDate"]); //查询起时间 单一参数
            DateTime EndDate      = Convert.ToDateTime(Request.Form["EndDate"]);   //查询止时间 单一参数
            string   DeliveryCode = Request.Form["DeliveryCode"].ToString();       //出库单号 单一参数
            string   DeliveryType = Request.Form["DeliveryType"].ToString();       //出库类型 单一参数


            string     SelectStorage        = Request.Form["SelectStorage"].ToString(); //来源仓库编码
            List <int> listSourceStroageIDs = new List <int>();

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

            string     TargetStorage        = Request.Form["TargetStorage"].ToString(); //目标仓库编码
            List <int> listTargetStorageIDs = null;

            if (TargetStorage != "")
            {
                listTargetStorageIDs = TargetStorage.Split(',').Select <string, int>(e => Convert.ToInt32(e)).ToList();
            }

            string        MaterialType = Request.Form["MaterialType"].ToString();
            List <string> mTypeList    = UserOperateContext.Current.getMaterialTypeList(MaterialType);
            string        MaterialID   = Request.Form["MaterialID"].ToString();

            //获取页容量
            int pageSize = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageIndex = int.Parse(Request.Form["page"]);
            int total     = 0;
            var list      = new I_DeliveryBLL().GetDeliveryList(pageIndex, pageSize, ref total, StartDate, EndDate, DeliveryCode, DeliveryType, listSourceStroageIDs, listTargetStorageIDs, mTypeList, MaterialID);

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