12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data.Entity;
- 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 test
- {
- /// <summary>
- /// Логика взаимодействия для korzinka.xaml
- /// </summary>
- public partial class korzinka : Page
- {
- List<Books> bo = new List<Books>();
- public korzinka(List<Books> books, int sale)
- {
- InitializeComponent();
- ListZak.ItemsSource = books;
- ListZak.Items.Refresh();
- bo = books;
- if(sale==0)
- }
- private void menu_Click(object sender, RoutedEventArgs e)
- {
- ChangePage.Frame.Navigate(new books());
- }
- private void clear_Click(object sender, RoutedEventArgs e)
- {
- ListZak.ItemsSource = null;
- ListZak.Items.Refresh();
- }
- private void delit_Click(object sender, RoutedEventArgs e)
- {
- Button button = (Button)sender;
- int id = Convert.ToInt32(button.Uid);
- Books prov = Base.Entities.Books.FirstOrDefault(x => x.IdBook == id);
- bo.Remove(prov);
- ListZak.Items.Refresh();
- }
- }
- }
|