private void btnLogin_Click(object sender, EventArgs e) { if (txtUserId.Text == "" || txtPhoneNumber.Text == "" || txtPassword.Text == "") { MessageBox.Show("Please Fill all the required fields", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (txtUserId.TextLength != 5) { MessageBox.Show("UserId should contain 5 characters", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (txtPhoneNumber.TextLength != 10) { MessageBox.Show("Please Enter a valid 10 digit number", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { BusinessAccessClass bc = new BusinessAccessClass(); // MessageBox.Show("Valida"); int x = bc.authenticateCustomer(txtUserId.Text, txtPhoneNumber.Text, txtPassword.Text); if (x == 1) { MessageBox.Show("Valid"); } else { MessageBox.Show("Invalid"); } } }
private void btnRegister_Click(object sender, EventArgs e) { BusinessAccessClass bc = new BusinessAccessClass(); int x = bc.registerCustomer(txtCustomerName.Text, txtPassword.Text, txtConfirmPassword.Text, datepickerDOB.Text, txtEmail.Text, txtPhoneNumber.Text, DDLCountry.Text, DDLCity.Text, txtPinCode.Text); if (x == 1) { MessageBox.Show("Registration Failed"); } else { MessageBox.Show("Registration Success"); } }