Пример #1
0
        public async Task<ActionResult> EditProductKey(AddEditProductKeyViewModel model)
        {
            model.LoggedInUser = await storeService.GetCurrentUser();
            model.FullNavList = CreateStoreControllerAdminNavList();

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

            storeService.EditProductKey(model.ProductKey);

            return RedirectToAction("AdminProductKeys");
        }
Пример #2
0
        public async Task<ActionResult> EditProductKey(int id)
        {
            AddEditProductKeyViewModel model = new AddEditProductKeyViewModel();

            model.ProductKey = storeService.GetProductKeyByID(id);

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

            return View(model);
        }