private static BaseReadOnlyModel GetSectionModel(Section entity) { if (entity is HtmlContentSection) { var htmlContent = new HtmlContentSectionReadOnlyModel(); htmlContent.Html = ((HtmlContentSection)entity).GetLocalized(x => x.Html); htmlContent.Controller = "HtmlContent"; return(htmlContent); } else if (entity is WorkHistorySection) { var resume = new WorkHistorySectionReadOnlyModel(); resume.ApplicationUserName = ((WorkHistorySection)entity).ApplicationUserName; resume.Controller = "WorkHistory"; return(resume); } return(null); }
public ActionResult ReadOnly(WorkHistorySectionReadOnlyModel model) { return(PartialView("ReadOnly", model)); }