Exemplo n.º 1
0
        public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType, IList <Seat> Seats) : base()
        {
            this.Name         = Name;
            this.Order        = Order;
            this.CarriageType = CarriageType;
            this.Seats        = Seats ?? new List <Seat>();
            this.Train        = Train;

            Train?.AddTrainCarriage(this);
        }
Exemplo n.º 2
0
        public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType, IList <Seat> Seats)
        {
            this.Id           = Guid.NewGuid();
            this.Name         = Name;
            this.Order        = Order;
            this.CarriageType = CarriageType;
            this.Seats        = Seats ?? new List <Seat>();
            this.Train        = Train;

            AddTime      = DateTimeOffset.Now;
            UpdateTime   = DateTimeOffset.Now;
            AddUserId    = UserHelper.User.Id;
            UpdateUserId = UserHelper.User.Id;

            Train.AddTrainCarriage(this);
        }
Exemplo n.º 3
0
 public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType) : this(Train, Order, Name, CarriageType, null)
 {
 }
Exemplo n.º 4
0
 public TrainCarriage(int Order, string Name, CarriageTypeConfig CarriageType) : this(null, Order, Name, CarriageType)
 {
 }