public ActionResult UpdateCategorie(Categorie categorie) { CategorieDbController controller = new CategorieDbController(); controller.UpdateCategorie(categorie); ViewBag.Succes = "Het updaten van deze categorie is gelukt"; return RedirectToAction("Beheer", "Account"); }
public ActionResult VoegCategorieToe(Categorie categorie) { if(ModelState.IsValid){ CategorieDbController controller = new CategorieDbController(); controller.insertCategorie(categorie); ViewBag.succes = "Het toevoegen van het product is gelukt"; } return RedirectToAction("Beheer", "Account"); }
public ActionResult Search(string search, int type) { //product search from product name ProductDBController productController = new ProductDBController(); if (type == 0) { return View(productController.getListProductFromNameSearch(search)); } else { //product search from categorie id CategorieDbController categorie = new CategorieDbController(); return View(productController.getListProductFromCategorie(categorie.getCategorieIdByName(search))); } }
public ActionResult ToevoegenProduct() { CategorieDbController controller = new CategorieDbController(); ViewBag.Categorieen = controller.getListWithAllCategorieen(); return View(); }
public ActionResult DeleteCategorie(int id) { CategorieDbController controller = new CategorieDbController(); controller.DeleteCategorie(id); return RedirectToAction("Beheer", "Account"); }
public ActionResult UpdateCategorie(int id) { CategorieDbController controller = new CategorieDbController(); ViewBag.categorieList = controller.getListWithAllCategorieen(); return View(controller.getCategorieFromId(id)); }
public ActionResult VoegCategorieToe() { CategorieDbController controller = new CategorieDbController(); ViewBag.categorieList = controller.getListWithAllCategorieen(); return View(); }
public ActionResult AlleCategorieen() { CategorieDbController controller = new CategorieDbController(); return View(controller.getListWithAllCategorieen()); }