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

namespace WebApplication1
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Btn_Login_Click(object sender, EventArgs e)
        {
            BLL.Users us = new BLL.Users();
            DataTable dt = us.select("");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (Text_User.Text == dt.Rows[i][1].ToString())
                {
                    if (Text_Pwd.Text == dt.Rows[i][2].ToString())
                    {
                        Response.Redirect("main.aspx?user="+Text_User.Text);
                    }
                }
            }
        }
    }
}
