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"); }
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); //取得频道名称 }
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"); }