Пример #1
0
        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
        }
Пример #2
0
        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
        }
Пример #3
0
        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
        }
Пример #4
0
        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
        }