Пример #1
0
 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);
 }
Пример #2
0
 public ActionResult ReadOnly(WorkHistorySectionReadOnlyModel model)
 {
     return(PartialView("ReadOnly", model));
 }