Пример #1
0
		/// <summary>
		/// Adds the contents of another <see cref="NoticeinfoCollection">NoticeinfoCollection</see> to the end of the collection.
		/// </summary>
		/// <param name="value">A <see cref="NoticeinfoCollection">NoticeinfoCollection</see> containing the Components to add to the collection. </param>
		public void AddRange(NoticeinfoCollection value) 
		{
			for (int i = 0;	(i < value.Count); i = (i +	1))	
			{
				this.Add((NoticeInfo)value.List[i]);
			}
		}
Пример #2
0
 public void AddRange(NoticeinfoCollection value)
 {
     for (int i = 0; i < value.Count; i++)
     {
         this.Add((NoticeInfo)value.List[i]);
     }
 }
Пример #3
0
        protected override void ShowPage()
        {
            pagetitle = "用户控制面板";

            if (!IsLogin()) return; 
            
            if (filter == "spacecomment" && config.Enablespace == 0)
            {
                AddErrLine("系统未开启" + config.Spacename + "服务, 当前页面暂时无法访问!");
                return;
            }
            if (filter == "albumcomment" && config.Enablealbum == 0)
            {
                AddErrLine("系统未开启" + config.Albumname + "服务, 当前页面暂时无法访问!");
                return;
            }
            if ((filter == "goodstrade" || filter == "goodsleaveword") && config.Enablemall == 0)
            {
                AddErrLine("系统未开启交易服务, 当前页面暂时无法访问!");
                return;
            }

            Noticetype noticetype = Notices.GetNoticetype(filter);            
            reccount = Notices.GetNoticeCountByUid(userid, noticetype);
            
            BindItems(reccount, "usercpnotice.aspx?filter=" + filter);
            noticeinfolist = Notices.GetNoticeinfoCollectionByUid(userid, noticetype, pageid, 16);
            newnoticecount = Notices.GetNewNoticeCountByUid(userid);
            Notices.UpdateNoticeNewByUid(userid, 0);
            OnlineUsers.UpdateNewNotices(olid, -1 * newnoticecount);
        }
Пример #4
0
 public NoticeinfoCollection(NoticeinfoCollection value)
 {
     this.AddRange(value);
 }
Пример #5
0
 public NoticeinfoCollectionEnumerator(NoticeinfoCollection mappings)
 {
     this._temp       = mappings;
     this._enumerator = this._temp.GetEnumerator();
 }
Пример #6
0
 /// <summary>
 /// 获取指定用户的所有通知
 /// </summary>
 /// <param name="uid">用户id</param>
 /// <returns>通知集合</returns>
 private static NoticeinfoCollection NoticeinfoCollectionDTO(IDataReader idatareader)
 {
     NoticeinfoCollection noticeinfocoll = new NoticeinfoCollection();
     while (idatareader.Read())
     {
         noticeinfocoll.Add(LoadSingleNoticeInfo(idatareader));
     }
     idatareader.Close();
     return noticeinfocoll;
 }
Пример #7
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NoticeinfoCollection">NoticeinfoCollection</see> class containing the elements of the specified source collection.
		/// </summary>
		/// <param name="value">A <see cref="NoticeinfoCollection">NoticeinfoCollection</see> with which to initialize the collection.</param>
		public NoticeinfoCollection(NoticeinfoCollection value)	
		{
			this.AddRange(value);
		}
Пример #8
0
			/// <summary>
			/// Initializes a new instance of the <see cref="NoticeinfoCollectionEnumerator">NoticeinfoCollectionEnumerator</see> class referencing the specified <see cref="NoticeinfoCollection">NoticeinfoCollection</see> object.
			/// </summary>
			/// <param name="mappings">The <see cref="NoticeinfoCollection">NoticeinfoCollection</see> to enumerate.</param>
			public NoticeinfoCollectionEnumerator(NoticeinfoCollection mappings)
			{
				_temp =	((IEnumerable)(mappings));
				_enumerator = _temp.GetEnumerator();
			}
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NoticeinfoCollectionEnumerator">NoticeinfoCollectionEnumerator</see> class referencing the specified <see cref="NoticeinfoCollection">NoticeinfoCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="NoticeinfoCollection">NoticeinfoCollection</see> to enumerate.</param>
 public NoticeinfoCollectionEnumerator(NoticeinfoCollection mappings)
 {
     _temp       = ((IEnumerable)(mappings));
     _enumerator = _temp.GetEnumerator();
 }