Exemplo n.º 1
0
        protected void SubmitRegisterBtn_Click(object sender, EventArgs e)
        {
            Regist mregister = new Regist();

               CheckRegist mckregist = new CheckRegist();
               int mFlag4 = mckregist.CheckUserRegist(TextBox3.Text);
               if (mFlag4 == 0)
               {

                      int mFlag3 = mregister.UserRegist(TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox6.Text);
                      Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('注册成功!')</script>");
                      if (mFlag3 == 0)
                      {
                          Response.Redirect("Login.aspx");
                      }
                      else
                      {
                          Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('注册失败')</script>");
                      }
               }
               else
               {
                   Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('该邮箱已被注册!请重新注册!')</script>");

               }
        }
Exemplo n.º 2
0
        protected void SubmitRegisterBtn_Click(object sender, EventArgs e)
        {
            Regist mregist = new Regist();
               int mFlag4 = mregist.CheckUserRegist(txtEmail.Text);
               if (mFlag4 == 0)
               {

                   int mFlag3 = mregist.UserRegist(txtName.Text, txtEmail.Text, txtPassword1.Text, txtRemark.Text);

                      if (mFlag3 == 0)
                      {
                          Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('注册成功!')</script>");
                          Response.Redirect("ChatLogin.aspx");
                      }
                      else
                      {
                          Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('注册失败')</script>");
                          return;
                      }
               }
               else
               {
                   Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "<script Language='javascript'>alert('该邮箱已被注册!请重新注册!')</script>");
                   return;

               }
        }