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)); }
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)); }
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)); }