Beispiel #1
0
        public ActionResult Depot(int page, int limit)
        {
            var bll  = new DepotBll();
            var List = bll.SelectList().Select(i => new
            {
                i.Id,
                ProductId = i.product.ProductName,
                i.stock
            });
            var ListJson = new
            {
                code  = 0,
                msg   = "",
                count = List.Count(),
                data  = List.Skip((page - 1) * limit).Take(limit).ToList()
            };

            return(Json(ListJson, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public ActionResult AddDepot(depot AddData)
        {
            var Flag = new DepotBll().Add(AddData) != 0;

            return(Content(Flag.ToString()));
        }
Beispiel #3
0
        public ActionResult GetSelectDepot(int id)
        {
            var MaxNum = new DepotBll().SelectList().Where(i => i.ProductId == id).First().stock;

            return(Content(MaxNum.ToString()));
        }
Beispiel #4
0
        public ActionResult SelectDepotNum()
        {
            var list = new DepotBll().SelectList().Select(i => new { id = i.ProductId, name = i.product.ProductName });

            return(Json(list, JsonRequestBehavior.AllowGet));
        }