Beispiel #1
0
 protected void btnReg_Click(object sender, EventArgs e)
 {
     if (this.IsValid)
     {
         bool b;
         long vcd;
         vcd = DBComponent.GenerateVerification();
         b   = DBComponent.userSignup(txtunm.Text.Trim(), txtMbno.Text.Trim(), vcd.ToString());
         if (b)
         {
             lblMsg.Text = "Registered Successfully, Verification code Sent To Your Mobile";
             this.Session["username"] = txtunm.Text.Trim();
             this.Session["mbno"]     = txtMbno.Text.Trim();
             SMS sobj = (SMS)Application["SmsObject"];
             sobj.sendSMS(txtMbno.Text.Trim(), "Your Verification Code is " + vcd.ToString() + "  oPas - A User Verification Protocol");
             BtnNext.Enabled = true;
             btnReg.Enabled  = false;
         }
         else
         {
             lblMsg.Text = "Failed to Register,Try After Some Time";
         }
     }
     else
     {
         lblMsg.Text = "Please Correct The Errors";
     }
 }