public ActionResult Index(MainPageModel sm) { MainPageModel data = new MainPageModel(); GetPropertyData propertydata = new GetPropertyData(); try { if (ModelState.IsValid) { data.AllProperty = propertydata.GetAllProperty(sm.SearchModel); //ContactModel con = new ContactModel(); //status = con.InsertVisitor(ct); ModelState.Clear(); } else { data.AllProperty = propertydata.GetAllProperty(); } } catch { } CallList(); return(View(data)); }
private ContentInfo GetContent(GetPropertyData getPropertyData) { HashSet <Type> types = TypeHelper.GetAllConcreteTypesAssignableFrom <SystemEntity>(); Type entityType = types.FirstOrDefault(t => t.Name == getPropertyData.Type); if (entityType == null) { return(new ContentInfo()); } object entity = _session.Get(entityType, getPropertyData.Id); if (entity == null) { return(new ContentInfo()); } PropertyInfo propertyInfo = entityType.GetProperties().FirstOrDefault(info => info.Name == getPropertyData.Property); if (propertyInfo == null) { return(new ContentInfo()); } return(new ContentInfo { Content = Convert.ToString(propertyInfo.GetValue(entity, null)), Entity = entity }); }
public ActionResult Index() { CallList(); GetPropertyData propertydata = new GetPropertyData(); MainPageModel data = new MainPageModel(); data.AllProperty = propertydata.GetAllProperty(); return(View(data)); }
public string GetFormattedBodyContent(GetPropertyData getPropertyData, Controller controller) { ContentInfo content = GetContent(getPropertyData); object entity = content.Entity; if (entity is Webpage) { CurrentRequestData.CurrentPage = entity as Webpage; } HtmlHelper htmlHelper = MrCMSHtmlHelper.GetHtmlHelper(controller); return(htmlHelper.ParseShortcodes(content.Content).ToHtmlString()); }
public string GetFormattedBodyContent(GetPropertyData getPropertyData) { return(_inPageAdminService.GetFormattedBodyContent(getPropertyData, this)); }
public string GetUnformattedBodyContent(GetPropertyData getPropertyData) { return(GetContent(getPropertyData).Content); }