StartPage.xaml.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net.Http;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace WindowedMyApp
  17. {
  18. /// <summary>
  19. /// Логика взаимодействия для StartPage.xaml
  20. /// </summary>
  21. public partial class StartPage : Page
  22. {
  23. public StartPage()
  24. {
  25. InitializeComponent();
  26. using (ModelClass db = new ModelClass())
  27. {
  28. List<Tours> tour = db.Tours.ToList();
  29. nameTour1.Content = tour[0].Name_Tour;
  30. dateStartTour1.Content = tour[0].Date_Start;
  31. dateFinishTour1.Content = tour[0].Date_Finish;
  32. costTour1.Content = tour[0].Cost_Tour;
  33. nameTour2.Content = tour[1].Name_Tour;
  34. dateStartTour2.Content = tour[1].Date_Start;
  35. dateFinishTour2.Content = tour[1].Date_Finish;
  36. costTour2.Content = tour[1].Cost_Tour;
  37. nameTour3.Content = tour[2].Name_Tour;
  38. dateStartTour3.Content = tour[2].Date_Start;
  39. dateFinishTour3.Content = tour[2].Date_Finish;
  40. costTour3.Content = tour[2].Cost_Tour;
  41. }
  42. }
  43. }
  44. }