示例#1
0
        public async Task<ActionResult> EditPlatform(AddEditPlatformViewModel model)
        {
            model.LoggedInUser = await storeService.GetCurrentUser();
            model.FullNavList = CreateStoreControllerAdminNavList();

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

            storeService.DownloadIconURL(model.Platform, Server.MapPath(@"~/Content/PlatformIcons/"), model.FileExtension);
            
            storeService.EditPlatform(model.Platform);

            return RedirectToAction("AdminPlatforms");
        }
示例#2
0
        public async Task<ActionResult> EditPlatform(int id)
        {
            AddEditPlatformViewModel model = new AddEditPlatformViewModel();

            model.Platform = storeService.GetPlatformByID(id);

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

            return View(model);
        }