using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_comment : Fm.Bussiness.BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Bind("");
    }
    void Bind(string where)
    {
        FormPaging_Rep1.TableName = "Fm_comment_view";
        FormPaging_Rep1.ColName = "comid";
        FormPaging_Rep1.Rep = Repeater1;
        FormPaging_Rep1.Where = where;
        FormPaging_Rep1.Order = 1;
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Fm.Bussiness.Comments comment = new Fm.Bussiness.Comments();
        Fm.EntityClass.Comments com = new Fm.EntityClass.Comments();
        foreach (RepeaterItem item in Repeater1.Items)
        {
            //查找选择控件
            CheckBox ch = item.FindControl("Check_Select") as CheckBox;
            if (ch.Checked)
            {
                com.comid = int.Parse(ch.ToolTip);
                comment.CommentDel(com);
            }
        }
        Response.Redirect("Erro.aspx?eid=所选评论删除成功!&url=comment.aspx", false);

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Fm.Bussiness.Comments comment = new Fm.Bussiness.Comments();
        Fm.EntityClass.Comments com = new Fm.EntityClass.Comments();
        com.docid = int.Parse(txtdocid.Text);
        if (comment.CommentDelToDoc(com))
        {
            Response.Redirect("Erro.aspx?eid=该文章下所有评论删除成功!&url=comment.aspx", false);
        }
    }
}
