private void btnDelete_Click(object sender, RoutedEventArgs e) { try { EasyHousingSolutionEntity.Cart cart = new EasyHousingSolutionEntity.Cart(); string propName = txtPropertyName.Text; if (cartBL.DeleteCartBL(propName)) { MessageBox.Show("Cart item deleted successfully..."); } else { MessageBox.Show("Something went wrong..."); } } catch (EasyHousingSolutionException ex) { MessageBox.Show("Error: " + ex.Message); } }