private void Initialize() { List <CategoryVO> list = new List <CategoryVO>(); list = manager.GetAll(); foreach (CategoryVO c in list) { bindingSource1.Add(c); } }
public ActionResult AddPost() { PostSubmissionVM model = new PostSubmissionVM(); CategoriesManager manager = new CategoriesManager(); var allCategories = manager.GetAll(); foreach (var cat in allCategories.Categories) { model.Categories.Add(cat); } return(View(model)); }
private void loaderBGW_DoWork(object sender, DoWorkEventArgs e) { FoldersManager FoldersManager = new FoldersManager(); CategoriesManager categoriesManager = new CategoriesManager(); PartiesManager partiesManager = new PartiesManager(); DestinationsManager destinationManager = new DestinationsManager(); //Thread.Sleep(5000); allFolders = FoldersManager.GetAll(); allCategories = categoriesManager.GetAll(); allParties = partiesManager.GetAll(); allDestinations = destinationManager.GetAll(); }
//1.a public IActionResult Index() { var category = CategoriesManager.GetAll() .Select(c => c.ToCModel()).ToList(); return(View(category)); /*using (var db = new DbContext()) * { * var category = db.Categories.OrderBy(c => c.Name) * .Select(c => new CategoriesModel() * { * Id = c.Id, * Name = c.Name, * }) * .ToList(); * return View(category); */ //var category = Categories.OrderBy(c => c.Id).ToList(); //return View(category); }
// 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()); }
public void LoadCategories() { CategoiresGridView.DataSource = _CategoriesManager.GetAll(); CategoiresGridView.DataBind(); }