예제 #1
0
        public async Task<ActionResult> EditProductCategory(AddEditProductCategoryViewModel model)
        {
            model.LoggedInUser = await storeService.GetCurrentUser();
            model.FullNavList = CreateStoreControllerAdminNavList();

            if (ModelState.IsValid == false)
            {
                return View(model);
            }

            storeService.EditProductCategory(model.ProductCategory);

            return RedirectToAction("AdminProductCategories");
        }
예제 #2
0
        public async Task<ActionResult> EditProductCategory(int id)
        {
            AddEditProductCategoryViewModel model = new AddEditProductCategoryViewModel();

            model.ProductCategory = storeService.GetProductCategoryByID(id);

            model.LoggedInUser = await storeService.GetCurrentUser();
            model.FullNavList = CreateStoreControllerAdminNavList();

            return View(model);
        }