MainWindow.xaml.cs 881 B

12345678910111213141516171819202122232425262728293031323334
  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 MySqlConnector;
  12. using Dapper;
  13. using mysql_connector2.res;
  14. namespace mysql_connector2
  15. {
  16. public partial class MainWindow : Window
  17. {
  18. public List<Product> productList { get; set; }
  19. private void ExitButton_Click(object sender, RoutedEventArgs e)
  20. {
  21. Application.Current.Shutdown();
  22. }
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. DataContext = this;
  27. Globals.dataProvider = new DBDataProvider();
  28. productList = (List<Product>)Globals.dataProvider.getProduct();
  29. }
  30. }
  31. }