/// <summary> /// Copies the elements of the specified <see cref="TagInfo">TagInfo</see> array to the end of the collection. /// </summary> /// <param name="value">An array of type <see cref="TagInfo">TagInfo</see> containing the Components to add to the collection.</param> public void AddRange(TagInfo[] value) { for (int i = 0; (i < value.Length); i = (i + 1)) { this.Add(value[i]); } }
/// <summary> /// 将reader转化为实体类 /// </summary> /// <param name="reader"></param> /// <returns></returns> public static TagInfo LoadSingleTagInfo(IDataReader reader) { TagInfo tag = new TagInfo(); tag.Tagid = TypeConverter.ObjectToInt(reader["tagid"]); tag.Tagname = reader["tagname"].ToString(); tag.Userid = TypeConverter.ObjectToInt(reader["userid"]); tag.Postdatetime = Convert.ToDateTime(reader["postdatetime"]); tag.Orderid = TypeConverter.ObjectToInt(reader["orderid"]); tag.Color = reader["color"].ToString(); tag.Count = TypeConverter.ObjectToInt(reader["count"]); tag.Fcount = TypeConverter.ObjectToInt(reader["fcount"]); tag.Pcount = TypeConverter.ObjectToInt(reader["pcount"]); tag.Scount = TypeConverter.ObjectToInt(reader["scount"]); tag.Vcount = TypeConverter.ObjectToInt(reader["vcount"]); return tag; }
/// <summary> /// Copies the collection Components to a one-dimensional <see cref="T:System.Array">Array</see> instance beginning at the specified index. /// </summary> /// <param name="array">The one-dimensional <see cref="T:System.Array">Array</see> that is the destination of the values copied from the collection.</param> /// <param name="index">The index of the array at which to begin inserting.</param> public void CopyTo(TagInfo[] array, int index) { this.List.CopyTo(array, index); }
/// <summary> /// Gets a value indicating whether the collection contains the specified <see cref="TagInfoCollection">TagInfoCollection</see>. /// </summary> /// <param name="value">The <see cref="TagInfoCollection">TagInfoCollection</see> to search for in the collection.</param> /// <returns><b>true</b> if the collection contains the specified object; otherwise, <b>false</b>.</returns> public bool Contains(TagInfo value) { return this.List.Contains(value); }
public int Add(TagInfo value) { return this.List.Add(value); }
public void Remove(TagInfo value) { List.Remove(value); }
/// <summary> /// Initializes a new instance of the <see cref="TagInfoCollection">TagInfoCollection</see> class containing the specified array of <see cref="TagInfo">TagInfo</see> Components. /// </summary> /// <param name="value">An array of <see cref="TagInfo">TagInfo</see> Components with which to initialize the collection. </param> public TagInfoCollection(TagInfo[] value) { this.AddRange(value); }
/// <summary> /// Gets the index in the collection of the specified <see cref="TagInfoCollection">TagInfoCollection</see>, if it exists in the collection. /// </summary> /// <param name="value">The <see cref="TagInfoCollection">TagInfoCollection</see> to locate in the collection.</param> /// <returns>The index in the collection of the specified object, if found; otherwise, -1.</returns> public int IndexOf(TagInfo value) { return this.List.IndexOf(value); }
public void Insert(int index, TagInfo value) { List.Insert(index, value); }
/// <summary> /// Gets a value indicating whether the collection contains the specified <see cref="TagInfoCollection">TagInfoCollection</see>. /// </summary> /// <param name="value">The <see cref="TagInfoCollection">TagInfoCollection</see> to search for in the collection.</param> /// <returns><b>true</b> if the collection contains the specified object; otherwise, <b>false</b>.</returns> public bool Contains(TagInfo value) { return(this.List.Contains(value)); }
protected override void ShowPage() { if (config.Enabletag != 1) { AddErrLine("没有启用Tag功能"); return; } if (tagid > 0) { tag = Tags.GetTagInfo(tagid); if (tag == null || tag.Orderid < 0) { AddErrLine("指定的标签不存在或已关闭"); return; } pagetitle = tag.Tagname; if (Utils.StrIsNullOrEmpty(listtype)) listtype = "topic"; if (IsErr()) return; BindItem(); } else { pagetitle = "标签"; taglist = ForumTags.GetCachedHotForumTags(100); } }
public int Add(TagInfo value) { return(this.List.Add(value)); }
/// <summary> /// Gets the index in the collection of the specified <see cref="TagInfoCollection">TagInfoCollection</see>, if it exists in the collection. /// </summary> /// <param name="value">The <see cref="TagInfoCollection">TagInfoCollection</see> to locate in the collection.</param> /// <returns>The index in the collection of the specified object, if found; otherwise, -1.</returns> public int IndexOf(TagInfo value) { return(this.List.IndexOf(value)); }
protected override void ShowPage() { if (config.Enabletag != 1) { AddErrLine("没有启用Tag功能"); return; } tagid = DNTRequest.GetInt("tagid", 0); if (tagid > 0) { tag = Tags.GetTagInfo(tagid); if (tag == null) { AddErrLine("指定的标签不存在"); return; } if (tag.Orderid < 0) { AddErrLine("指定的标签已被关闭"); } if (IsErr()) { return; } listtype = DNTRequest.GetString("t"); pageid = DNTRequest.GetInt("page", 1); if (pageid < 1) { pageid = 1; } pagetitle = tag.Tagname; if (listtype.Equals("")) { listtype = "topic"; } switch (listtype) { case "topic": topiccount = Topics.GetTopicsCountWithSameTag(tagid); pagecount = topiccount % config.Tpp == 0 ? topiccount / config.Tpp : topiccount / config.Tpp + 1; if (pagecount == 0) { pagecount = 1; } if (pageid > pagecount) { pageid = pagecount; } if (topiccount > 0) { topiclist = Topics.GetTopicsWithSameTag(tagid, pageid, config.Tpp); pagenumbers = Utils.GetPageNumbers(pageid, pagecount, "tags.aspx?t=topic&tagid=" + tagid, 8); } else { AddMsgLine("该标签下暂无主题"); } break; } } else { pagetitle = "标签"; taglist = ForumTags.GetCachedHotForumTags(100); } }