示例#1
0
        public IActionResult Create(CategorieViewModel categorieModel)
        {
            Categorie newCategorie = CategorieMapper.Categorie(categorieModel);

            categorieContainer.AddNew(newCategorie);

            return(RedirectToAction("Index", CategorieMapper.AllCategorieViewModels()));
        }
        public IActionResult AddKlant(int klantId)
        {
            int orderId = GetSessionOrderId();

            Order order = orderContainer.GetByID(orderId);

            order.AddKlant(klantId);


            return(RedirectToAction("Index", "Categories", CategorieMapper.AllCategorieViewModels()));
        }
示例#3
0
        public IActionResult Delete(int id)
        {
            categorieContainer.Delete(id);

            return(RedirectToAction("Index", CategorieMapper.AllCategorieViewModels()));
        }
示例#4
0
 public IActionResult Index()
 {
     return(View(CategorieMapper.AllCategorieViewModels()));
 }
        public IActionResult EditOrder(int id)
        {
            SetSessionOrderId(id);

            return(RedirectToAction("Index", "Categories", CategorieMapper.AllCategorieViewModels()));
        }