MainWindow.xaml.cs 942 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Text;
  2. using System.Windows;
  3. using System.Windows.Controls;
  4. using System.Windows.Data;
  5. using System.Windows.Documents;
  6. using System.Windows.Input;
  7. using System.Windows.Media;
  8. using System.Windows.Media.Imaging;
  9. using System.Windows.Navigation;
  10. using System.Windows.Shapes;
  11. using trade_akapralov.classes;
  12. using trade_akapralov.idataprovider;
  13. namespace trade_akapralov
  14. {
  15. public partial class MainWindow : Window
  16. {
  17. public List<Product> ProductList { get; set; }
  18. public MainWindow()
  19. {
  20. InitializeComponent();
  21. DataContext = this;
  22. Globals.DataProvider = new DBDataProvider();
  23. ProductList = (List<Product>?)Globals.DataProvider.getProduct();
  24. }
  25. public List<Product> productList { get; set; }
  26. private void ExitButton_Click(object sender, RoutedEventArgs e)
  27. {
  28. Application.Current.Shutdown();
  29. }
  30. }
  31. }