Exemplo n.º 1
0
 /// <summary>
 /// Adds the contents of another <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> to the end of the collection.
 /// </summary>
 /// <param name="value">A <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> containing the Components to add to the collection. </param>
 public void AddRange(PrivateMessageInfoCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add((PrivateMessageInfo)value.List[i]);
     }
 }
		/// <summary>
		/// Adds the contents of another <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> to the end of the collection.
		/// </summary>
		/// <param name="value">A <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> containing the Components to add to the collection. </param>
		public void AddRange(PrivateMessageInfoCollection value) 
		{
			for (int i = 0;	(i < value.Count); i = (i +	1))	
			{
				this.Add((PrivateMessageInfo)value.List[i]);
			}
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> class containing the elements of the specified source collection.
		/// </summary>
		/// <param name="value">A <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> with which to initialize the collection.</param>
		public PrivateMessageInfoCollection(PrivateMessageInfoCollection value)	
		{
			this.AddRange(value);
		}
			/// <summary>
			/// Initializes a new instance of the <see cref="PrivateMessageInfoCollectionEnumerator">PrivateMessageInfoCollectionEnumerator</see> class referencing the specified <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> object.
			/// </summary>
			/// <param name="mappings">The <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> to enumerate.</param>
			public PrivateMessageInfoCollectionEnumerator(PrivateMessageInfoCollection mappings)
			{
				_temp =	((IEnumerable)(mappings));
				_enumerator = _temp.GetEnumerator();
			}
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> class containing the elements of the specified source collection.
 /// </summary>
 /// <param name="value">A <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> with which to initialize the collection.</param>
 public PrivateMessageInfoCollection(PrivateMessageInfoCollection value)
 {
     this.AddRange(value);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrivateMessageInfoCollectionEnumerator">PrivateMessageInfoCollectionEnumerator</see> class referencing the specified <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="PrivateMessageInfoCollection">PrivateMessageInfoCollection</see> to enumerate.</param>
 public PrivateMessageInfoCollectionEnumerator(PrivateMessageInfoCollection mappings)
 {
     _temp       = ((IEnumerable)(mappings));
     _enumerator = _temp.GetEnumerator();
 }
Exemplo n.º 7
0
        /// <summary>
        /// 获得指定用户的短信息列表
        /// </summary>
        /// <param name="userid">用户ID</param>
        /// <param name="folder">短信息类型(0:收件箱,1:发件箱,2:草稿箱)</param>
        /// <param name="pagesize">每页显示短信息数</param>
        /// <param name="pageindex">当前要显示的页数</param>
        /// <param name="strwhere">筛选条件</param>
        /// <returns>短信息列表</returns>
	    public static PrivateMessageInfoCollection GetPrivateMessageCollection(int userid, int folder, int pagesize, int pageindex, int inttype)
        {
            PrivateMessageInfoCollection coll = new PrivateMessageInfoCollection();
            IDataReader reader = DatabaseProvider.GetInstance().GetPrivateMessageList(userid, folder, pagesize, pageindex, inttype);
            if (reader != null)
            {

                while (reader.Read())
                {
                    PrivateMessageInfo info = new PrivateMessageInfo();
                    info.Pmid = int.Parse(reader["pmid"].ToString());
                    info.Msgfrom = reader["msgfrom"].ToString();
                    info.Msgfromid = int.Parse(reader["msgfromid"].ToString());
                    info.Msgto = reader["msgto"].ToString();
                    info.Msgtoid = int.Parse(reader["msgtoid"].ToString());
                    info.Folder = Int16.Parse(reader["folder"].ToString());
                    info.New = int.Parse(reader["new"].ToString());
                    info.Subject = reader["subject"].ToString();
                    info.Postdatetime = reader["postdatetime"].ToString();
                    info.Message = reader["message"].ToString();
                    coll.Add(info);
                }
                reader.Close();
            }
            return coll;
        }