private void label2_Click(object sender, EventArgs e) { this.Hide(); Login_Page login = new Login_Page(); login.Show(); }
protected void btnUpdate_Click(object sender, EventArgs e) { string newCustomerNameHome = txtCustomerNameHome.Text; string newDobHome = txtDobHome.Text; string newAgeHome = txtAgeHome.Text; string newGenderHome = txtGenderHome.Text; string newAddressHome = txtAddressHome.Text; string newPhoneNoHome = txtPhoneNoHome.Text; string newAccountTypeHome = txtAccountTypeHome.Text; string newAccountStartDateHome = txtAccountStartDateHome.Text; string newCityHome = txtCityHome.Text; string newStateHome = txtStateHome.Text; string newPincodeHome = txtPincodeHome.Text; string newPasswordHome = txtPasswordHome.Text; if ((newCustomerNameHome.Equals("")) || (newDobHome.Equals("")) || (newAgeHome.Equals("")) || (newGenderHome.Equals("")) || (newAddressHome.Equals("")) || (newPhoneNoHome.Equals("")) || (newAccountTypeHome.Equals("")) || (newAccountStartDateHome.Equals("")) || (newCityHome.Equals("")) || (newStateHome.Equals("")) || (newPincodeHome.Equals("")) || (newPasswordHome.Equals(""))) { MessageBox.Show("please enter mandatory fields !!!"); } else { objBAL = new BALayer(); objDAL = new DBLayer(); int row = objBAL.customerUpdateBA(txtCustomerNameHome.Text, txtDobHome.Text, txtAgeHome.Text, txtGenderHome.Text, txtAddressHome.Text, txtPhoneNoHome.Text, txtAccountTypeHome.Text, txtAccountStartDateHome.Text, txtCityHome.Text, txtStateHome.Text, txtPincodeHome.Text, txtPasswordHome.Text, CustomerId); if (row == 1) { MessageBox.Show("Account Details updated successfully"); this.Hide(); Login_Page login = new Login_Page(); login.Show(); } else { MessageBox.Show("Error Occured.Try Again!!"); } } }
protected void button1_Click(object sender, EventArgs e) { string customerName = txtCustomerName.Text; string dob = txtDob.Text; string age = txtAge.Text; string gender = txtGender.Text; string address = txtAddress.Text; string phoneNo = txtPhoneNo.Text; string accountType = txtAccountType.Text; string accountStartDate = txtAccountStartDate.Text; string city = txtCity.Text; string state = txtState.Text; string pincode = txtPincode.Text; string password = txtPassword.Text; if ((customerName.Equals("")) || (dob.Equals("")) || (age.Equals("")) || (gender.Equals("")) || (address.Equals("")) || (phoneNo.Equals("")) || (accountType.Equals("")) || (accountStartDate.Equals("")) || (city.Equals("")) || (state.Equals("")) || (pincode.Equals("")) || (password.Equals(""))) { MessageBox.Show("please enter mandatory fields !!!"); } else { objBAL = new BALayer(); int row = objBAL.customerRegisterBA(txtCustomerName.Text, txtDob.Text, txtAge.Text, txtGender.Text, txtAddress.Text, txtPhoneNo.Text, txtAccountType.Text, txtAccountStartDate.Text, txtCity.Text, txtState.Text, txtPincode.Text, txtPassword.Text); if (row == 1) { MessageBox.Show("Account created successfully"); this.Hide(); Login_Page login = new Login_Page(); login.Show(); } else { MessageBox.Show("Error Occured.Try Again!!"); } } }
protected void btnDelete_Click(object sender, EventArgs e) { DialogResult dialog = MessageBox.Show("Are you Sure?", "Delete Account", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dialog == DialogResult.Yes) { objBAL = new BALayer(); objDAL = new DBLayer(); int row = objBAL.customerDeleteBA(CustomerId); if (row == 1) { MessageBox.Show("Account Deleted successfully"); this.Hide(); Login_Page login = new Login_Page(); login.Show(); } else { MessageBox.Show("Error Occured.Try Again!!"); } } }