public void bindSettings( ForumSetting s ) { String chk = "checked=\"checked\""; set( "s.HideShowStats", s.IsHideStats == 1 ? chk : "" ); set( "s.IsHideTop", s.IsHideTop == 1 ? chk : "" ); set( "s.IsHideOnline", s.IsHideOnline == 1 ? chk : "" ); set( "s.IsHideLink", s.IsHideLink == 1 ? chk : "" ); set( "s.PageSize", dropList( "PageSize", 1, 200, s.PageSize ) ); set( "s.TopicPageSize", dropList( "TopicPageSize", 1, 200, s.ReplySize ) ); set( "s.NewDays", dropList( "NewDays", 1, 60, s.NewDays ) ); set( "s.HomeHotDays", dropList( "HomeHotDays", 1, 365, s.HomeHotDays ) ); set( "s.HomeImgCount", dropList( "HomeImgCount", 1, 10, s.HomeImgCount ) ); set( "s.HomeListCount", dropList( "HomeListCount", 1, 20, s.HomeListCount ) ); }
public ForumSetting GetSettingsObj() { if (strUtil.IsNullOrEmpty(this.Settings)) { return(new ForumSetting()); } if (_settings != null) { return(_settings); } ForumSetting s = Json.Deserialize <ForumSetting>(this.Settings); s.SetDefaultValue(); _settings = s; return(s); }
public virtual void bindSettings( ForumSetting s ) { String chk = "checked=\"checked\""; set( "s.HideShowStats", s.IsHideStats == 1 ? chk : "" ); set( "s.IsHideTop", s.IsHideTop == 1 ? chk : "" ); set( "s.IsHideOnline", s.IsHideOnline == 1 ? chk : "" ); set( "s.IsHideLink", s.IsHideLink == 1 ? chk : "" ); set( "s.PageSize", dropList( "PageSize", 1, 200, s.PageSize ) ); set( "s.TopicPageSize", dropList( "TopicPageSize", 1, 200, s.ReplySize ) ); set( "s.NewDays", dropList( "NewDays", 1, 60, s.NewDays ) ); set( "s.HomeHotDays", dropList( "HomeHotDays", 1, 365, s.HomeHotDays ) ); set( "s.HomeImgCount", dropList( "HomeImgCount", 1, 10, s.HomeImgCount ) ); set( "s.HomeListCount", dropList( "HomeListCount", 1, 20, s.HomeListCount ) ); set( "s.MetaKeywords", s.MetaKeywords ); set( "s.MetaDescription", s.MetaDescription ); set( "s.ReplyInterval", dropList( "ReplyInterval", 1, 300, s.ReplyInterval ) ); }