예제 #1
0
 protected void Button1_click(object sender, EventArgs e)
 {
     //register code here.
     if (pass.Value.Equals(con_pass.Value))
     {
         bool IsRegistered = sc.Registerd(email1.Value, pass.Value);
         if (IsRegistered != true)
         {
             User u = new User
             {
                 name        = fname.Value,
                 lastname    = lname.Value,
                 email       = email1.Value,
                 phonenumber = cell.Value,
                 password    = pass.Value,
                 active      = 1,
                 usertype    = Type
             };
             int Registration = sc.AddMember(u);
             if (Registration.Equals(1))
             {
                 Response.Redirect("login.aspx");
             }
             else
             {
                 messageDiv.Visible = true;
             }
             message.Value = "User Already Registered";
         }
     }
     else
     {
         messageDiv.Visible = true;
     }
     message.Value = "Passwords Do not Match";
 }