Imagara 2 年 前
コミット
cf50e9be8d

+ 2 - 17
RaspisKusach/Pages/SearchForTicketsPage.xaml

@@ -109,26 +109,11 @@
                                            Source="/Resources/Train.png">
                                     </Image>
                                     <StackPanel>
-                                        <Label Content="{Binding route.IdRoute}"/>
-                                        <Label Content="{Binding str}"
+                                        <Label Content="{Binding trip.Trains.Name}"/>
+                                        <Label Content="{Binding trip.Trains.Category}"
                                                Margin="0,-7,0,0"/>
                                     </StackPanel>
                                 </StackPanel>
-                                <!--UPRIGHT-->
-                                <StackPanel Orientation="Horizontal"
-                                Grid.Column="1"
-                                HorizontalAlignment="Right">
-                                    <Image Source="/Resources/Train.png"
-                                       Margin="3">
-                                    </Image>
-                                    <Image Source="/Resources/Train.png"
-                                       Margin="3">
-                                    </Image>
-                                    <Image Source="/Resources/Train.png"
-                                       Margin="3">
-                                    </Image>
-
-                                </StackPanel>
                             </Grid>
 
                             <!--DOWN-->

+ 1 - 1
RaspisKusach/Pages/SearchForTicketsPage.xaml.cs

@@ -47,7 +47,7 @@ namespace RaspisKusach.Pages
                     rt.timeArrival = Functions.GetArrivalTime(arrivalStation, trip).ToString(new CultureInfo("ru-RU"));
                     rt.timeDeparture = Functions.GetDepartureTime(departureStation, trip).ToString(new CultureInfo("ru-RU"));
                     rt.timeBetween = Functions.GetArrivalTime(arrivalStation, trip) - Functions.GetDepartureTime(departureStation, trip);
-
+                    
                     routeList.Add(rt);
                 }
             }

+ 2 - 1
RaspisKusach/Pages/TripInfoPage.xaml

@@ -32,7 +32,8 @@
                 </Grid.RowDefinitions>
                 <StackPanel Orientation="Horizontal">
                     <Image Source="/RaspisKusach;component/Resources/Train.png" />
-                    <Label Content="ПОЕЗД  #123"/>
+                    <Label Name="TrainName" Content="ПОЕЗД  #123"/>
+                    <Label Name="TrainCategory"/>
                 </StackPanel>
 
                 <Label Grid.Row="1"

+ 2 - 0
RaspisKusach/Pages/TripInfoPage.xaml.cs

@@ -15,6 +15,8 @@ namespace RaspisKusach.Pages
             trip = _trip;
 
             Direction.Content = Functions.GetAllStations(trip.Routes);
+            TrainName.Content = trip.Trains.Name;
+            TrainCategory.Content = trip.Trains.Category;
 
             CarriageListBox.Items.Clear();
             UpdateCarriagesList();

+ 1 - 1
RaspisKusach/Session.cs

@@ -5,6 +5,6 @@ namespace RaspisKusach
     class Session
     {
         public static Users User { get; set; }
-        public static Stations ThisStation = cnt.db.Stations.Where(item => item.IdStation == 4).FirstOrDefault();//cnt.db.Stations.Where(item => item.Location == "Tomsk").FirstOrDefault
+        public static Stations ThisStation = cnt.db.Stations.Where(item => item.Name == "TOMSK-2").FirstOrDefault();
     }
 }