示例#1
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        int sucCount   = 0;
        int errorCount = 0;

        Cms.BLL.C_article_comment bll = new Cms.BLL.C_article_comment();
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                if (bll.Delete(id))
                {
                    adminUser.AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), bll.GetModel(id).content); //记录日志
                    sucCount += 1;
                }
                else
                {
                    errorCount += 1;
                }
            }
        }

        JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!",
                   Utils.CombUrlTxt("comment_list.aspx", "channel_id={0}&keywords={1}&property={2}", this.channel_id.ToString(), this.keywords, this.property), "Success");
    }
示例#2
0
 private void ShowInfo(int _id)
 {
     Cms.BLL.C_article_comment bll = new Cms.BLL.C_article_comment();
     model                   = bll.GetModel(_id);
     txtReContent.Text       = Utils.ToTxt(model.reply_content);
     rblIsLock.SelectedValue = model.is_lock.ToString();
     this.channel_name       = "";//new BLL.channel().GetChannelName(model.channel_id); //取得频道名称
 }
示例#3
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     Cms.BLL.C_article_comment bll = new Cms.BLL.C_article_comment();
     model               = bll.GetModel(this.id);
     model.is_reply      = 1;
     model.reply_content = Utils.ToHtml(txtReContent.Text);
     model.is_lock       = int.Parse(rblIsLock.SelectedValue);
     model.reply_time    = DateTime.Now;
     bll.Update(model);
     adminUser.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), model.reply_content); //记录日志
     JscriptMsg("评论回复成功!", "comment_list.aspx?channel_id=" + model.channel_id, "Success");
 }
示例#4
0
 protected void btnAudit_Click(object sender, EventArgs e)
 {
     Cms.BLL.C_article_comment bll = new Cms.BLL.C_article_comment();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             int counts = Cms.DBUtility.DbHelperSQL.ExecuteSql("update C_article_comment set is_lock=0 where id='" + id + "'");//修改
         }
     }
     JscriptMsg("审核通过成功!", Utils.CombUrlTxt("comment_list.aspx", "channel_id={0}&keywords={1}&property={2}",
                                            this.channel_id.ToString(), this.keywords, this.property), "Success");
 }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.channel_id   = Convert.ToInt32(Request.QueryString["channel_id"]);
        this.channel_name = ""; //取得频道名称
        this.property     = Request.QueryString["property"];
        this.keywords     = Request.QueryString["keywords"];


        if (!Page.IsPostBack)
        {
            Cms.BLL.C_article_comment bll = new Cms.BLL.C_article_comment();
            string where = "select * from C_article_comment  order by id desc";
            this.AspNetPager1.AlwaysShow  = true;
            this.AspNetPager1.PageSize    = 10;
            this.AspNetPager1.RecordCount = bll.GetRecordCount("");
            this.RepeaterDataBind(where);
        }
    }