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"); }
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); }