public ActionResult Index(SiteContentIndexModel model) { var domain = _contentBusiness.GetByContentTypeId(model.SiteContent.SiteContentTypeId); domain.Body = HttpUtility.HtmlDecode(model.SiteContent.Body); _contentBusiness.SaveChanges(WamsUser.WamsId); model.SiteContentTypeId = model.SiteContent.SiteContentTypeId; return(RedirectToAction("Index", new { siteContentTypeId = model.SiteContent.SiteContentTypeId })); }
public ActionResult Index(int siteContentTypeId = (int)SiteContentType.AgencyAgreement) { var domain = _contentBusiness.GetByContentTypeId(siteContentTypeId); var contentModel = new SiteContentModel { Id = domain.Id, Body = domain.Body, SiteContentTypeId = domain.SiteContentTypeId }; var model = new SiteContentIndexModel { SiteContentTypeId = siteContentTypeId, SiteContent = contentModel }; return(View(model)); }