예제 #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DbLayer db = new DbLayer();

            String name  = tbRegName.Text;
            String email = tbRegEmail.Text;
            string pwd   = "";

            String region = DropDownList1.Text;

            // Validation UserID
            bool bCheckID = db.checkUserID(email);

            /*
             * if (!bCheckID)
             * {
             *  string script = "alert(\"The username already exists. Please use a different username.\");";
             *  ScriptManager.RegisterStartupScript(this, GetType(),
             *                        "ServerControlScript", script, true);
             *  return;
             * } //A1contact!
             */

            int id = db.getMaxUser();

            db.UpdateUser(id, email, name, region);

            //Response.Cookies["user"].Value = email;
            //Response.Cookies["user"].Expires = DateTime.Now.AddDays(3);
            Response.Redirect("Customer.aspx");
        }