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)); }
public ActionResult AddDepot(depot AddData) { var Flag = new DepotBll().Add(AddData) != 0; return(Content(Flag.ToString())); }
public ActionResult GetSelectDepot(int id) { var MaxNum = new DepotBll().SelectList().Where(i => i.ProductId == id).First().stock; return(Content(MaxNum.ToString())); }
public ActionResult SelectDepotNum() { var list = new DepotBll().SelectList().Select(i => new { id = i.ProductId, name = i.product.ProductName }); return(Json(list, JsonRequestBehavior.AllowGet)); }