Esempio n. 1
0
        /// <summary>
        /// 内部是从 myPost 获取,目前作用于 会员中心
        /// </summary>
        /// <returns></returns>
        public DataTable get_user_post_list(int pageSize, int pageIndex, string strwhere, string filedOrder, out int recordCount)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Forum_MyPost().GetList(pageSize, pageIndex, strwhere, filedOrder, out recordCount).Tables[0];

            return(dt);
        }
Esempio n. 2
0
        /// <summary>
        /// 删除一条数据,相关会员贴子和记录都清掉,掉用和前端一样的方法
        /// </summary>
        public bool Delete(int UserId)
        {
            BLL.Forum_MyTopic bllMyTopic = new Forum_MyTopic();
            BLL.Forum_MyPost  bllMyPost  = new Forum_MyPost();
            BLL.Forum_Topic   bllTopic   = new Forum_Topic();

            //清我的贴子
            List <Model.Forum_MyTopic> listMyTopic = bllMyTopic.GetModelList("UserId=" + UserId);

            foreach (Model.Forum_MyTopic item in listMyTopic)
            {
                bllTopic.Delete(item.TopicId);
            }

            //清我的回贴记录
            bllMyPost.Delete("UserId=" + UserId);

            return(dal.Delete(UserId));
        }