ResultPage.xaml.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.Navigation;
  14. using System.Windows.Shapes;
  15. namespace HelpHelf.Pages
  16. {
  17. /// <summary>
  18. /// Логика взаимодействия для ResultPage.xaml
  19. /// </summary>
  20. public partial class ResultPage : Page
  21. {
  22. SessionTestTable sessionTest;
  23. public ResultPage(int session)
  24. {
  25. InitializeComponent();
  26. sessionTest = Classes.DateBase.connect.SessionTestTable.FirstOrDefault(x => x.ID == session);
  27. rDate.Text = sessionTest.Date.ToString("dd.MM.yyyy");
  28. rName.Text = sessionTest.UserTable.Surname + " " + sessionTest.UserTable.Name;
  29. listDisease.ItemsSource = Classes.DateBase.connect.SessionDiseaseTable.Where(x => x.IdSession == sessionTest.ID).ToList();
  30. }
  31. private void btnMenu_Click(object sender, RoutedEventArgs e)
  32. {
  33. Classes.DebugClass.diagWrite("Переход на страницу главного меню");
  34. Classes.FrameClass.frmMain.Navigate(new MainPage(sessionTest.UserTable.LoginedTable));
  35. }
  36. }
  37. }