MainWindow.xaml.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using MedicalCenter;
  2. using MedicalCenter.Pages;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. using MedicallCenter.Clasees;
  18. namespace MedicallCenter
  19. {
  20. /// <summary>
  21. /// Логика взаимодействия для MainWindow.xaml
  22. /// </summary>
  23. public partial class MainWindow : Window
  24. {
  25. public MainWindow()
  26. {
  27. InitializeComponent();
  28. Manager.frame = MainFrame;
  29. Manager.frame.Navigate(new Page_Authorization());
  30. }
  31. private void Window_Loaded(object sender, RoutedEventArgs e)
  32. {
  33. CurrentData.db = new EntitiesMedical();
  34. CurrentData.results = CurrentData.db.Result.ToList();
  35. CurrentData.users = CurrentData.db.User.ToList();
  36. CurrentData.services = CurrentData.db.Service.ToList();
  37. CurrentData.workers = CurrentData.db.Worker.ToList();
  38. CurrentData.types = CurrentData.db.Type.ToList();
  39. CurrentData.historyHots = CurrentData.db.HistoryHot.ToList();
  40. }
  41. private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
  42. {
  43. Manager.KillTimer();
  44. }
  45. }
  46. }