Handbooks.xaml.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace kursach_2._0.Windows
  15. {
  16. /// <summary>
  17. /// Логика взаимодействия для Handbooks.xaml
  18. /// </summary>
  19. public partial class Handbooks : Window
  20. {
  21. private dealerContext _context;
  22. public Handbooks()
  23. {
  24. InitializeComponent();
  25. _context = new dealerContext();
  26. Load();
  27. }
  28. // вывод данных
  29. private void Load()
  30. {
  31. productsDG.ItemsSource = _context.products.ToList();
  32. distributorDG.ItemsSource = _context.distributors.ToList();
  33. employeesDG.ItemsSource = _context.employees.ToList();
  34. }
  35. private void HomeClick(object sender, MouseButtonEventArgs e)
  36. {
  37. Windows.Menu menu = new Windows.Menu();
  38. menu.Show();
  39. Close();
  40. }
  41. }
  42. }