Exemplo n.º 1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     this.ChkAdminLevel("channel_" + this.channel_name + "_comment", DTEnums.ActionEnum.Reply.ToString());
     Rain.BLL.article_comment articleComment = new Rain.BLL.article_comment();
     this.model.is_reply      = 1;
     this.model.reply_content = Utils.ToHtml(this.txtReContent.Text);
     this.model.is_lock       = int.Parse(this.rblIsLock.SelectedValue);
     this.model.reply_time    = new DateTime?(DateTime.Now);
     articleComment.Update(this.model);
     this.AddAdminLog(DTEnums.ActionEnum.Reply.ToString(), "回复" + this.channel_name + "频道评论ID:" + (object)this.model.id);
     this.JscriptMsg("评论回复成功!", "comment_list.aspx?channel_id=" + (object)this.model.channel_id);
 }
Exemplo n.º 2
0
        protected DataTable get_comment_list(int article_id, int top, string strwhere)
        {
            DataTable dataTable = new DataTable();

            if (article_id > 0)
            {
                string strWhere = string.Format("article_id={0}", (object)article_id);
                if (!string.IsNullOrEmpty(strwhere))
                {
                    strWhere = strWhere + " and " + strwhere;
                }
                dataTable = new Rain.BLL.article_comment().GetList(top, strWhere, "add_time desc").Tables[0];
            }
            return(dataTable);
        }
Exemplo n.º 3
0
        protected int get_comment_count(int article_id, string strwhere)
        {
            int num = 0;

            if (article_id > 0)
            {
                string strWhere = string.Format("article_id={0}", (object)article_id);
                if (!string.IsNullOrEmpty(strwhere))
                {
                    strWhere = strWhere + " and " + strwhere;
                }
                num = new Rain.BLL.article_comment().GetCount(strWhere);
            }
            return(num);
        }
Exemplo n.º 4
0
        protected DataTable get_comment_list(
            int article_id,
            int page_size,
            int page_index,
            string strwhere,
            out int totalcount)
        {
            DataTable dataTable = new DataTable();

            if (article_id > 0)
            {
                string strWhere = string.Format("article_id={0}", (object)article_id);
                if (!string.IsNullOrEmpty(strwhere))
                {
                    strWhere = strWhere + " and " + strwhere;
                }
                dataTable = new Rain.BLL.article_comment().GetList(page_size, page_index, strWhere, "add_time desc", out totalcount).Tables[0];
            }
            else
            {
                totalcount = 0;
            }
            return(dataTable);
        }