public ActionResult UpdateInfoText(SystemViewModels.SystemViewModel model) { if (ModelState.IsValid) { try { var userName = User.Identity.GetUserName(); AdmInformation info = new AdmInformation { Id = model.SelectedInfoId, Text = model.SelectedInfoText }; _portalAdminService.UppdateraInformationstext(info, userName); } catch (Exception e) { Console.WriteLine(e); ErrorManager.WriteToErrorLog("SystemController", "UpdateInfoText", e.ToString(), e.HResult, User.Identity.Name); var errorModel = new CustomErrorPageModel { Information = "Ett fel inträffade vid uppdatering av informationstext.", ContactEmail = ConfigurationManager.AppSettings["ContactEmail"], }; return(View("CustomError", errorModel)); } } return(RedirectToAction("GetInformationTexts")); }