private void button1_Click_1(object sender, RoutedEventArgs e) { bool cvc = checkCVC(); if (cvc) { if (checkCard()) { if (checkName()) { if (checkExpire()) { cart.removeAll(user.UserID); int a = cart.colSum(user.UserID); for (int i = 0; i < books.Count; i++) { cart.cBook(user.UserID, books[i][0], Int32.Parse(books[i][1])); } UserControl usc = new Store(user); user_Check.Children.Clear(); user_Check.Children.Add(usc); } } } } }
public Checkout(UserData u, List <List <string> > b) { InitializeComponent(); this.user = u; this.books = b; cart = new BookCart(); UserControl usc = new Store(user); int a = cart.colSum(user.UserID); total = a; label_Copy.Content = "Total:$ " + a; }