public void TagList( int pageNumber , TagListHeadFootTemplate head , TagListHeadFootTemplate foot , TagListItemTemplate item) { #region 标签列表 int pageSize = Consts.DefaultTagListPageSize; int? count = null; TagCollection tags = TagBO.Instance.GetUnlockTags(pageNumber, pageSize, ref count); TagListHeadFootParams headFootParams = new TagListHeadFootParams(count, pageSize); head(headFootParams); if (tags != null && tags.Count > 0) { int i = 0; foreach (Tag tag in tags) { TagListItemParams itemParams = new TagListItemParams(tag); item(itemParams, i++); } } foot(headFootParams); #endregion }
public void TagView( int tagID , string type , TagListItemTemplate item ) { #region 单条数据 Tag tag = TagBO.Instance.GetTag(tagID); TagType tagType = StringUtil.TryParse <TagType>(type, TagType.Blog); TagListItemParams listItemParams = new TagListItemParams(tag, tagType); item(listItemParams, 0); #endregion }
public void TagSearchList( string filter , int pageNumber , TagListHeadFootTemplate head , TagListHeadFootTemplate foot , TagListItemTemplate item) { #region 标签搜索列表 int? count = null; TagCollection tags = null; int pageSize = Consts.DefaultPageSize; TagListHeadFootParams headFootParams; AdminTagFilter tagFilter = AdminTagFilter.GetFromFilter(filter); if (tagFilter != null) { tags = TagBO.Instance.GetTagsBySearch(tagFilter, pageNumber, ref count); pageSize = tagFilter.PageSize; headFootParams = new TagListHeadFootParams(count, tagFilter, pageSize); } else { tags = TagBO.Instance.GetAllTags(pageNumber, pageSize, ref count); headFootParams = new TagListHeadFootParams(count, new AdminTagFilter(), pageSize); } head(headFootParams); if (tags != null && tags.Count > 0) { int i = 0; foreach (Tag tag in tags) { TagListItemParams itemParams = new TagListItemParams(tag); item(itemParams, i++); } } foot(headFootParams); #endregion }
public void TagView( int tagID , string type , TagListItemTemplate item ) { #region 单条数据 Tag tag = TagBO.Instance.GetTag(tagID); TagType tagType = StringUtil.TryParse<TagType>(type, TagType.Blog); TagListItemParams listItemParams = new TagListItemParams(tag, tagType); item(listItemParams, 0); #endregion }