private void btnsignin_Click(object sender, RoutedEventArgs e) { try { Customer customer = new Customer(); customer.UserName = txtusername.Text; customer.Password = txtpassword.Password; CustomerBL customerBL = new CustomerBL(); bool result = customerBL.CustomerLoginBL(customer); if (result == true) { MessageBox.Show("Login Successful!"); this.Close(); SelectRecipe recipepage = new SelectRecipe(customer.UserName); recipepage.Show(); } else { MessageBox.Show("Login Unsuccessful!"); } } catch (RecipeIngredientSystemExceptions ex) // { // System.Windows.MessageBox.Show(ex.Message); // }// }
//back button private void backbtn_Click(object sender, RoutedEventArgs e) { this.Close(); SelectRecipe cartpage = new SelectRecipe(txtusername.Text); //redirect to select recipe page cartpage.Show(); }