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 Fm.Bussiness;

public partial class Admin_sys_login : BasePage
{
   
    protected void Page_Load(object sender, EventArgs e)
    {
        GetPage("");
    }
    //查询数据并且分页
    void GetPage(string where)
    {
        FormPaging1.TableName = "Fm_login";
        FormPaging1.ColName = "lo_id";
        FormPaging1.Where = where;
        FormPaging1.Gv = GridView1;
    }
    //删除所选择的数据
    protected void Button1_Click(object sender, EventArgs e)
    {
        Fm_Admin_Login login = new Fm_Admin_Login();
        Fm.EntityClass.Login log = new Fm.EntityClass.Login();
        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            CheckBox ch = GridView1.Rows[i].Cells[0].FindControl("CheckBox1") as CheckBox;
            if (ch.Checked)
            { 
               
                log.lo_id = int.Parse(GridView1.DataKeys[i].Value.ToString());
                login.Login_Ip_del(log);
            }
        }
        Response.Redirect("Erro.aspx?eid=网站后台登录信息删除成功!&url=sys_login.aspx", false);
    }
    //清空登陆日志
    protected void Button2_Click(object sender, EventArgs e)
    {
        public_select ps = new public_select();
        ps.Queryps("delete from Fm_login");
       // login.Login_Ip_del("");
        Response.Redirect("Erro.aspx?eid=网站后台登录信息删除成功!&url=sys_login.aspx", false);
    }
}
