Beispiel #1
0
 protected void btnAVPVerifyOTP_Click(object sender, EventArgs e)
 {
     lblOTPError.Text = "";
     if (txtOTP.Text.Trim().Length == 8)
     {
         if (System.Text.RegularExpressions.Regex.IsMatch(txtOTP.Text.Trim(), @"^\d+$"))
         {
             if (txtOTP.Text.Trim() == Enc.Decrypt(AVP.EncryptedOTP))
             {
                 AVP.EncryptedOTP = "";
                 AVP.IsMobileVerified = "TRUE";
                 txtMobileNumber.ReadOnly = true;
                 btnVerifyMobileNumber.Visible = false;
             }
             else
             {
                 lblOTPError.Text = "Enter Valid OTP";
                 AVPMobileNumVerifyPopup.Show();
             }
         }
         else
         {
             lblOTPError.Text = "Enter Valid OTP";
             AVPMobileNumVerifyPopup.Show();
         }
     }
     else
     {
         lblOTPError.Text = "Enter Valid 8 digit OTP";
         AVPMobileNumVerifyPopup.Show();
     }
 }
Beispiel #2
0
        protected void btnVerifyMobileNumber_Click(object sender, EventArgs e)
        {
            lblOTPError.Text = "";
            if (txtMobileNumber.Text != "")
            {
                if(txtMobileNumber.Text.Trim().Length == 10)
                {
                    if(System.Text.RegularExpressions.Regex.IsMatch(txtMobileNumber.Text.Trim(), @"^\d+$"))
                    {
                        AryaVysyaPortalSave AVPS = new AryaVysyaPortalSave();
                        if (AVPS.CheckMobileNumExist(txtMobileNumber.Text.Trim()))
                        {
                            txtOTP.Text = "";
                            txtOTP.Focus();

                            AVP.EncryptedOTP = Enc.Encrypt(otp.NewOTP());
                            string Message = Enc.Decrypt(AVP.EncryptedOTP) + " is your OTP to verify, your application number avp. do not share with others. From:KARNATAKA ARYA VYSYA COMMUNITY DEVELOPMENT CORPORATION";
                            SM.sendSMS(txtMobileNumber.Text.Trim(), Message, 2, "LGNOTP");
                            AVPMobileNumVerifyPopup.Show();
                        }
                        else 
                        {
                            lblNotificationHeading.Text = "Exist";
                            lblNotificationContent.Text = "Mobile Number already exist <br/ >Change Your Mobile Number";
                            txtMobileNumber.ReadOnly = false;
                            btnVerifyMobileNumber.Visible = true;
                            OtherDetailsPopup.Show();
                        }
                    }
                    else
                    {
                        lblNotificationHeading.Text = "Error";
                        lblNotificationContent.Text = "Enter Valid Mobile Number";
                        txtMobileNumber.Focus();
                        OtherDetailsPopup.Show();
                    }
                }
                else
                {
                    lblNotificationHeading.Text = "Error";
                    lblNotificationContent.Text = "Enter Valid Mobile Number";
                    OtherDetailsPopup.Show();
                    txtMobileNumber.Focus();
                }
            }
            else
            {
                lblNotificationHeading.Text = "Error";
                lblNotificationContent.Text = "Enter Mobile Number";
                txtMobileNumber.Focus();
                OtherDetailsPopup.Show();
            }
        }
Beispiel #3
0
 protected void btnAVPOTPResend_Click(object sender, EventArgs e)
 {
     string Message =  Enc.Decrypt(AVP.EncryptedOTP)+ " is your OTP to verify, your application number of avp. do not share with others. From:KARNATAKA ARYA VYSYA COMMUNITY DEVELOPMENT CORPORATION";
     SM.sendSMS(txtMobileNumber.Text.Trim(), Message, 2, "LGNOTP");
     AVPMobileNumVerifyPopup.Show();
 }