public TicketModel(PassangerModel Passanger, int Price, VanModel Van, TrainModel Train, SeatModel Seat, string PlaceArrival) { this.passanger = Passanger; this.van = Van; this.train = Train; this.seat = Seat; this.placeArrival = PlaceArrival; }
public VanModel PickVan(List <SeatModel> SeatList, string Class, int Number) { VanModel pickedVan = VanList.FirstOrDefault(i => i.Class == Class && i.Number == Number); return(pickedVan); }
public TicketModel GetTicket(PassangerModel passanger, TrainModel PickedTrain, VanModel PickedVan, SeatModel PickedSeat, string PlaceArrival) { int price = 46; return(new TicketModel(passanger, price, PickedVan, PickedTrain, PickedSeat, PlaceArrival)); }