Пример #1
0
        public ActionResult ShopsList(string symbols = "")
        {
            ShopBs           shop  = new ShopBs();
            List <ShopModel> model = shop.GetList().Where(c => c.Name.Contains(symbols)).Select(c => (ShopModel)c).ToList();

            return(PartialView("~/Views/Admin/_ShopsList.cshtml", model));
        }
Пример #2
0
        public ActionResult EditSupply(int id)
        {
            ShopBs         bs       = new ShopBs();
            SupplyBs       supplyBs = new SupplyBs();
            SupplyAddModel model    = (SupplyAddModel)supplyBs.GetById(id);

            model.Shops = bs.GetList().Select(c => (ShopModel)c).ToList();

            return(View(model));
        }
Пример #3
0
        public ActionResult AddSupply()
        {
            ShopBs         bs    = new ShopBs();
            SupplyAddModel model = new SupplyAddModel();

            model.Shops         = bs.GetList().Select(c => (ShopModel)c).ToList();
            model.Supply.ShopId = model.Shops.FirstOrDefault().Id;

            return(View(model));
        }