private void signupButton_Click(object sender, EventArgs e) { new CommonValidation().CheckForInternetConnection(this); if (ComparePasswordBoxes()) { AdminDataAccess adminDataAccess = new AdminDataAccess(); if (adminDataAccess.IsPhoneEmailTaken(signupPhoneTextBox.Text, signupEmailTextBox.Text)) { MessageBox.Show("An Account Associated with this Phone/Email Already Exists!\nTry Logging In", "Error"); } else { otp = new Random().Next(100000, 999999); if (new OtpSender().Send(otp, signupPhoneTextBox.Text)) { signupGroupBox.Enabled = false; otpGroupBox.Visible = true; } else { MessageBox.Show("Invalid Phone Number!", "Failed"); } } } else { MessageBox.Show("Password and Confirm Password must be same!", "Error"); } }