コード例 #1
0
 private Ticket ReadTicket(SqlDataReader reader, TrainTrip trip)
 {
     var res = new Ticket();
     res.Id = (int)reader["TicketId"];
     res.Trip = trip;
     res.Cost = (double)reader["TicketCost"];
     res.BookingTime = reader["TicketBookingTime"] == DBNull.Value ? null : (DateTime?)reader["TicketBookingTime"];
     res.SeatNumber = (int)reader["TicketSeatNumber"];
     res.WagonNumber = (int)reader["TicketWagonNumber"];
     res.Passenger = ReadCustomer(reader);
     return res;
 }
コード例 #2
0
 public TripDetailsViewModel(TrainTrip trip, Ticket[] tickets)
 {
     Trip = trip;
     Tickets = tickets;
 }