public ActionResult Save() { List <ProductCategory> productCategories = productCategoriesManager.GetAll(); ViewBag.ProducCategoriesList = productCategories; List <SubCategory> subCategories = subCategoryManager.GetAll(); ViewBag.SubCategoriesList = subCategories; List <CategorySetup> categorySetups = categorySetupManager.GetAll(); ViewBag.ProducCategoriesList = categorySetups; List <GeneralCatagory> generalCatagories = generalCategoryManager.GetAll(); ViewBag.GeneralCategorisList = generalCatagories; return(View()); }
public ActionResult Products(int id, ShopModel m) { ProductsManager pm = new ProductsManager(); ProductCategoriesManager pcm = new ProductCategoriesManager(); m.pclist = pcm.GetAll().Where(x => x.CategoryID == id).ToList(); foreach (var item in m.pclist) { m.plist.Add(pm.Single(item.ProductsID)); } Session["Products"] = m.plist; //m.ProductCount = m.plist.Count(); return(RedirectToAction("Shop", "Shop", m)); }
// GET: Home public ActionResult Index() { CategoriesManager cm = new CategoriesManager(); ProductsManager pm = new ProductsManager(); BrandsManager bm = new BrandsManager(); ColorManager colm = new ColorManager(); SizeManager sm = new SizeManager(); ProductCategoriesManager pcm = new ProductCategoriesManager(); ProductColorsManager pcolm = new ProductColorsManager(); ProductSizesManager pszm = new ProductSizesManager(); BasketManager basm = new BasketManager(); BasketDetailManager bdm = new BasketDetailManager(); BasketTempManager btm = new BasketTempManager(); ParamManager parm = new ParamManager(); Session["Categories"] = cm.GetAll(); Session["Products"] = pm.GetAll(); Session["Brands"] = bm.GetAll(); Session["Colors"] = colm.GetAll(); Session["Sizes"] = sm.GetAll(); Session["ProductCategories"] = pcm.GetAll(); Session["ProductColorsManager"] = pcolm.GetAll(); Session["ProductSizesManager"] = pszm.GetAll(); Session["Basket"] = basm.GetAll(); Session["BasketDetail"] = bdm.GetAll(); Session["BasketTemp"] = btm.GetAll(); Session["Param"] = parm.GetAll(); baskettlist = btm.GetAll();; ViewBag.Login = "******"; ViewBag.Logout = "Logout"; return(View()); }