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;
using TopWinCMS.BLL;
using TopWinCMS.Common;
using TopWinCMS.Model;
namespace TopWinCMS.WebUI.Admin.SecurityCenter
{
    public partial class ScReport : System.Web.UI.Page
    {
        SQLModel s_model = new SQLModel();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RightsCheck.CheckWorkPower("SA_4");
                Bind();
            }
        }

        private void Bind()
        {
            GV_List.EmptyDataTemplate = TopWinCMS.WebFactory.PageBase.GetTemplate(this);
            LB_Path.Text = Config.SiteName + " → TopWin FileWatcher → 实时监控报告";

            s_model.Fields = "ID,Remark,UpDateTime";//查询字段
            s_model.WHERE = " Type=3";//请自己根据实际情况动态的改变查询条件
            s_model.PageSize = 10;//每行显示 N 条
            //绑定数据的控件，分页控件，分页实体类
            new TopWinCMS.BLL.SecurityCenterManage().BindList(GV_List, PageNavigation1, s_model);

        }


        protected void PageNavigation1_PageChanging(object src, TopWinCMS.WebControls.PageChangingEventArgs e)
        {
            s_model.PageNo = e.NewPageIndex;
            Bind();
        }


        protected void BT_Delete_Click(object sender, EventArgs e)
        {
            string IDs = GetSelectedRow.IDs(GV_List);
            new SecurityCenterManage().Delete(IDs, UpdatePanel1);
            Bind();
        }

        protected void BT_Clear_Click(object sender, EventArgs e)
        {
            new SecurityCenterManage().Delete(3, UpdatePanel1);
            Bind();
        }
    }
}