Beispiel #1
0
        public override bool DeleteNotifies(int?userID, IEnumerable <int> notifyIDs, out UnreadNotifyCollection unreadNotifies)
        {
            using (SqlQuery query = new SqlQuery())
            {
                query.CommandText = @"bx_DeleteNotifies";
                query.CommandType = CommandType.StoredProcedure;
                query.CreateParameter <int?>("@UserID", userID, SqlDbType.Int);
                query.CreateParameter <string>("@NotifyIDs", StringUtil.Join(notifyIDs), SqlDbType.VarChar, 8000);

                using (XSqlDataReader reader = query.ExecuteReader())
                {
                    unreadNotifies = new UnreadNotifyCollection(reader);
                }
            }

            return(true);
        }
Beispiel #2
0
        ///// <summary>
        ///// 删除指定用户指定类型的多个通知
        ///// </summary>
        ///// <param name="userID">指定用户ID</param>
        ///// <param name="notifyType">指定类型</param>
        //public abstract bool DeleteUserNotifiesByType(int? userID, int type);

        /// <summary>
        /// 删除多个通知
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="notifyIDs">要删除的通知的ID集</param>
        public abstract bool DeleteNotifies(int?userID, IEnumerable <int> notifyIDs, out UnreadNotifyCollection unreads);