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)); }
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 SeatModel PickSeat(int Number, string Type) { SeatModel pickedSeat = SeatList.FirstOrDefault(i => i.Number == Number && i.Type == Type && !i.IsOccuped); return(pickedSeat); }