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 etw_c_m_allowdel : System.Web.UI.Page
{
    public string page = string.Empty;
    public string errid = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["page"] != null && Request.QueryString["errid"] != null)
        {
            page = Request.QueryString["page"].ToString();
            errid = Request.QueryString["errid"].ToString();
            etw.etw_error lead = new etw.etw_error();
            lead.id = Convert.ToInt32(errid);
            lead.allow = 0;
            lead.Upallow();
            lead.GetModel();
            DataSet ds = DbHelperSQL.Query("select id from etw_IP where usernameid='" + lead.usernameid + "' and ip='"+lead.ip+"'");
            if (ds.Tables[0].Rows.Count > 0)
            {
                etw.etw_IP lead_ip = new etw.etw_IP();
                lead_ip.id = Convert.ToInt32(ds.Tables[0].Rows[0]["id"].ToString());
                lead_ip.Delete();
            }
            Fun.JsAlerT("屏蔽成功", "loginerror.aspx?page=" + page + "");
        }
    }
}
