protected void Page_Load(object sender, EventArgs e) { LoginValidator validator = new LoginValidator(); //Session["loginUser"] = "******"; if (!validator.isLogin() || !validator.deleteValid()) { Response.Redirect("403.aspx"); } if (!IsPostBack) { dataInit(); } }
protected void Page_Load(object sender, EventArgs e) { /* var conn = ConnPool.getInstance; * //var res=conn.exeQuery("SELECT auth FROM emp_auth INNER JOIN employee WHERE auth='select' and employee.ename = N'张三';"); * DataTable res = conn.exeQuery("SELECT count(*) FROM Auth "); * GridView1.DataSource = res.DefaultView; * GridView1.DataBind();*/ Session["loginUser"] = "******"; LoginValidator validator = new LoginValidator(); Response.Write("select " + validator.selectValid()); Response.Write("update " + validator.updateValid()); Response.Write("insert " + validator.insertValid()); Response.Write("delete " + validator.deleteValid()); }
protected void Page_Load(object sender, EventArgs e) { Session["loginUser"] = "******"; var conn = ConnPool.getInstance; var res = conn.exeQuery( "SELECT auth FROM Auth join employee where ename='张三'"); Response.Write(res.Rows[0][0]); LoginValidator validator = new LoginValidator(); Response.Write("select " + validator.selectValid() + " "); Response.Write("update " + validator.updateValid() + " "); Response.Write("insert " + validator.insertValid() + " "); Response.Write("delete " + validator.deleteValid()); }