using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp2.Pages
{
    /// <summary>
    /// Логика взаимодействия для CartPage.xaml
    /// </summary>
    public partial class CartPage : Page
    {
        List<Book> cart;
        public CartPage(List<Book> cartIn)
        {
            InitializeComponent();
            cart = cartIn;
            list.ItemsSource = cart;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            FrameClass.frame.GoBack();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            list.Items.Clear();
            cart.Clear();
            foreach (var book in cart)
            {
                var o = new Order();
                o.bookId = book.id;
                o.count = book.Count;


            }
            string msg = $"";
        }
    }
}
