public ActionResult EditSelectedFAQ(int faqId = 0) { var model = new SystemViewModels.SystemViewModel(); model.SelectedFAQ = new SystemViewModels.FAQViewModel(); var selectedFAQDb = _portalSosService.HamtaFAQ(faqId); model.SelectedFAQ.FAQkategoriId = selectedFAQDb.FAQkategoriId; model.SelectedFAQ.Id = selectedFAQDb.Id; model.SelectedFAQ.Fraga = selectedFAQDb.Fraga; model.SelectedFAQ.Svar = selectedFAQDb.Svar; model.SelectedFAQ.Sortering = selectedFAQDb.Sortering; if (selectedFAQDb.RegisterId != null) { model.SelectedFAQ.RegisterId = selectedFAQDb.RegisterId; } if (model.SelectedFAQ.RegisterId != null) { model.SelectedFAQ.SelectedRegisterId = model.SelectedFAQ.RegisterId; } else { model.SelectedFAQ.SelectedRegisterId = 0; } // Ladda drop down lists. var registerList = _portalSosService.HamtaAllaRegisterForPortalen(); this.ViewBag.RegisterList = CreateRegisterDropDownList(registerList); return(View("_EditSelectedFAQ", model)); }