Example #1
0
        public ActionResult Edit(int id)
        {
            var model     = _stallsRepository.GetModel(id);
            var printList = _printerRepository.GetList();

            ViewBag.Stalls      = model;
            ViewBag.PrinterList = printList;
            return(View());
        }
Example #2
0
        public ActionResult GetList(PrinterSearchDTO req)
        {
            if (req.ListType == 1)
            {
                req.offset = (req.offset - 1) * req.limit;
            }

            var list = _printerRepository.GetList(req, out int total);

            return(Json(new { rows = list, total = total, code = 0, msg = "" }, JsonRequestBehavior.AllowGet));
        }
Example #3
0
        public ActionResult GetModel(int id)
        {
            var model       = _areaRepository.GetWeixinPrint(id);
            var restaurants = _restaurantRepository.GetList();
            var prints      = _printerRepository.GetList();
            var areas       = _areaRepository.GetList(0);

            ViewBag.AreaPrint   = model;
            ViewBag.Restaurants = restaurants;
            ViewBag.Prints      = prints;
            ViewBag.Areas       = areas;
            return(Json(new { Model = model, Restaurants = restaurants, Prints = prints, Areas = areas }, JsonRequestBehavior.AllowGet));
        }