Exemplo n.º 1
0
 /// <summary>
 /// Copies the elements of the specified <see cref="IndexPageForumInfo">IndexPageForumInfo</see> array to the end of the collection.
 /// </summary>
 /// <param name="value">An array of type <see cref="IndexPageForumInfo">IndexPageForumInfo</see> containing the Components to add to the collection.</param>
 public void AddRange(IndexPageForumInfo[] value)
 {
     for (int i = 0;	(i < value.Length); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a value indicating whether the collection contains the specified <see cref="IndexPageForumInfoCollection">IndexPageForumInfoCollection</see>.
 /// </summary>
 /// <param name="value">The <see cref="IndexPageForumInfoCollection">IndexPageForumInfoCollection</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(IndexPageForumInfo value)
 {
     return this.List.Contains(value);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IndexPageForumInfoCollection">IndexPageForumInfoCollection</see> class containing the specified array of <see cref="IndexPageForumInfo">IndexPageForumInfo</see> Components.
 /// </summary>
 /// <param name="value">An array of <see cref="IndexPageForumInfo">IndexPageForumInfo</see> Components with which to initialize the collection. </param>
 public IndexPageForumInfoCollection(IndexPageForumInfo[] value)
 {
     this.AddRange(value);
 }
Exemplo n.º 4
0
 public int Add(IndexPageForumInfo value)
 {
     return this.List.Add(value);
 }
Exemplo n.º 5
0
 public void Remove(IndexPageForumInfo value)
 {
     List.Remove(value);
 }
Exemplo n.º 6
0
 public void Insert(int index, IndexPageForumInfo value)
 {
     List.Insert(index, value);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Gets the index in the collection of the specified <see cref="IndexPageForumInfoCollection">IndexPageForumInfoCollection</see>, if it exists in the collection.
 /// </summary>
 /// <param name="value">The <see cref="IndexPageForumInfoCollection">IndexPageForumInfoCollection</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(IndexPageForumInfo value)
 {
     return this.List.IndexOf(value);
 }
Exemplo n.º 8
0
 /// <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(IndexPageForumInfo[] array, int index)
 {
     this.List.CopyTo(array, index);
 }
Exemplo n.º 9
0
        public static List<IndexPageForumInfo> GetSubForumList(int fid, int colcount)
        {
            IDataReader reader = DatabaseProvider.GetInstance().GetSubForumReader(fid);
            List<IndexPageForumInfo> indexPageForumList = new List<IndexPageForumInfo>();

            if (reader != null)
            {
                while (reader.Read())
                {
                    IndexPageForumInfo info = new IndexPageForumInfo();
                    //赋值
                    info.Fid = TypeConverter.StrToInt(reader["fid"].ToString(), 0);
                    info.Parentid = TypeConverter.StrToInt(reader["parentid"].ToString(), 0);
                    info.Layer = TypeConverter.StrToInt(reader["layer"].ToString(), 0);
                    info.Name = reader["name"].ToString();
                    info.Pathlist = reader["pathlist"].ToString();
                    info.Parentidlist = reader["parentidlist"].ToString();
                    info.Subforumcount = TypeConverter.StrToInt(reader["subforumcount"].ToString(), 0);
                    info.Status = TypeConverter.StrToInt(reader["status"].ToString(), 0);
                    info.Colcount = colcount > 0 ? colcount : TypeConverter.StrToInt(reader["colcount"].ToString(), 0);
                    info.Displayorder = TypeConverter.StrToInt(reader["displayorder"].ToString(), 0);
                    info.Templateid = TypeConverter.StrToInt(reader["templateid"].ToString(), 0);
                    info.Topics = TypeConverter.StrToInt(reader["topics"].ToString(), 0);
                    info.CurrentTopics = TypeConverter.StrToInt(reader["curtopics"].ToString(), 0);
                    info.Posts = TypeConverter.StrToInt(reader["posts"].ToString(), 0);
                    info.Todayposts = TypeConverter.StrToInt(reader["todayposts"].ToString(), 0);
                    info.Lastpost = reader["lastpost"].ToString();
                    info.Lastposter = reader["lastposter"].ToString();
                    info.Lasttid = TypeConverter.StrToInt(reader["lasttid"].ToString(), 0);
                    info.Lastposterid = TypeConverter.StrToInt(reader["lastposterid"].ToString(), 0);
                    info.Lasttitle = reader["lasttitle"].ToString();
                    info.Allowsmilies = TypeConverter.StrToInt(reader["allowsmilies"].ToString(), 0);
                    info.Allowrss = TypeConverter.StrToInt(reader["allowrss"].ToString(), 0);
                    info.Allowhtml = TypeConverter.StrToInt(reader["allowhtml"].ToString(), 0);
                    info.Allowbbcode = TypeConverter.StrToInt(reader["allowbbcode"].ToString(), 0);
                    info.Allowimgcode = TypeConverter.StrToInt(reader["allowimgcode"].ToString(), 0);
                    info.Allowblog = TypeConverter.StrToInt(reader["allowblog"].ToString(), 0);
                    info.Istrade = TypeConverter.StrToInt(reader["istrade"].ToString(), 0);
                    info.Allowpostspecial = TypeConverter.StrToInt(reader["allowpostspecial"].ToString(), 0);
                    info.Allowspecialonly = TypeConverter.StrToInt(reader["allowspecialonly"].ToString(), 0);
                    info.Alloweditrules = TypeConverter.StrToInt(reader["alloweditrules"].ToString(), 0);
                    info.Allowthumbnail = TypeConverter.StrToInt(reader["allowthumbnail"].ToString(), 0);
                    info.Recyclebin = TypeConverter.StrToInt(reader["recyclebin"].ToString(), 0);
                    info.Modnewposts = TypeConverter.StrToInt(reader["modnewposts"].ToString(), 0);
                    info.Jammer = TypeConverter.StrToInt(reader["jammer"].ToString(), 0);
                    info.Disablewatermark = TypeConverter.StrToInt(reader["disablewatermark"].ToString(), 0);
                    info.Inheritedmod = TypeConverter.StrToInt(reader["inheritedmod"].ToString(), 0);
                    info.Autoclose = TypeConverter.StrToInt(reader["autoclose"].ToString(), 0);

                    info.Description = reader["description"].ToString();
                    info.Password = reader["password"].ToString();
                    info.Icon = reader["icon"].ToString();
                    if (!Utils.StrIsNullOrEmpty(info.Icon))
                        info.Icon = info.Icon.ToLower().IndexOf("http://") == 0 ? info.Icon : BaseConfigs.GetForumPath + info.Icon;

                    info.Postcredits = reader["postcredits"].ToString();
                    info.Replycredits = reader["replycredits"].ToString();
                    info.Redirect = reader["redirect"].ToString();
                    info.Attachextensions = reader["attachextensions"].ToString();
                    info.Moderators = reader["moderators"].ToString();
                    info.Rules = reader["rules"].ToString();
                    info.Topictypes = reader["topictypes"].ToString();
                    info.Viewperm = reader["viewperm"].ToString();
                    info.Postperm = reader["postperm"].ToString();
                    info.Replyperm = reader["replyperm"].ToString();
                    info.Getattachperm = reader["getattachperm"].ToString();
                    info.Postattachperm = reader["postattachperm"].ToString();
                    info.Applytopictype = TypeConverter.StrToInt(reader["applytopictype"].ToString(), 0);
                    info.Postbytopictype = TypeConverter.StrToInt(reader["postbytopictype"].ToString(), 0);
                    info.Viewbytopictype = TypeConverter.StrToInt(reader["viewbytopictype"].ToString(), 0);
                    info.Topictypeprefix = TypeConverter.StrToInt(reader["topictypeprefix"].ToString(), 0);
                    info.Permuserlist = reader["permuserlist"].ToString();
                    info.Seokeywords = reader["seokeywords"].ToString();
                    info.Seodescription = reader["seodescription"].ToString();
                    info.Rewritename = reader["rewritename"].ToString();

                    //扩展属性
                    info.Havenew = reader["havenew"].ToString();

                    indexPageForumList.Add(info);
                }
                reader.Close();
            }
            return indexPageForumList;
        }