Esempio n. 1
0
        public ActionResult AddShipping(Shipping AddData)
        {
            var Flag = new ShippingBll().Add(AddData) != 0;

            if (Flag)
            {
                new DepotBll().Update(AddData.ProductId, AddData.number, false);
            }
            return(Content(Flag.ToString()));
        }
Esempio n. 2
0
        public ActionResult SelectList(int limit, int page, string id)
        {
            var List = new ShippingBll().SelectList().Where(i => id == null || id == i.ShipperId).Select(i => new
            {
                i.ShippingId,
                i.ShipperId,
                i.number,
                i.ProductId,
            });
            var ListJson = new
            {
                code  = 0,
                msg   = "",
                count = List.Count(),
                data  = List.Skip((page - 1) * limit).Take(limit).ToList()
            };

            return(Json(ListJson, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        public ActionResult Shipping(int page, int limit, Shipping t)
        {
            var bll  = new ShippingBll();
            var List = bll.SelectList()
                       .Where(i => IsTrue(i.number, t.number) &&
                              IsTrue(i.ProductId, t.ProductId)
                              )
                       .Select(i => new
            {
                i.ShippingId,
                i.number,
                i.ShipperId,
                ProductId = i.product.ProductName,
            });
            var ListJson = new
            {
                code  = 0,
                msg   = "",
                count = List.Count(),
                data  = List.Skip((page - 1) * limit).Take(limit).ToList()
            };

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