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 Regist : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Btn_Zhuce_Click(object sender, EventArgs e)
        {
            BLL.Users B_us = new BLL.Users();
            Models.Users M_us = new Models.Users();
            M_us.stu_user = Text_User.Text;
            M_us.stu_pwd = Text_Pwd.Text;
            if (B_us.insert(M_us))
            {
                Text_User.Text = "";
                Text_Pwd.Text = "";
                Response.Write("<script>alert('注册成功！')</script>");
                Response.Redirect("Login.aspx");
            }
            else
            {
                Text_User.Text = "";
                Text_Pwd.Text = "";
                Response.Write("<script>alert('注册失败！')</script>");
            }
        }
    }
}
