Ejemplo n.º 1
0
 public PlanningWork(String descrption, int WorkingTime, Maintenance man, Scooter scot)
 {
     this.Description = descrption;
     this.WorkingTime = WorkingTime;
     this.maintenance = man;
     this.scooter     = scot;
 }
 public PlanningWork(String description, int worktime, Maintenance maintenance, Scooter scooter) : this()
 {
     Description = description;
     WorkingTime = worktime;
     Maintenance = maintenance;
     Scooter     = scooter;
 }
Ejemplo n.º 3
0
        public Rental(DateTime startDate, Station originStation, Scooter scooter, User user)
        {
            StartDate     = startDate;
            OriginStation = originStation;
            Scooter       = scooter;
            User          = user;

            TrackPoints = new List <TrackPoint>();
        }
Ejemplo n.º 4
0
 public Rental(DateTime?EndDate, Decimal Price, DateTime StartDate,
               Station OriginStation, Scooter Scooter, User User) : this()
 {
     this.EndDate       = EndDate;
     this.Price         = Price;
     this.StartDate     = StartDate;
     this.OriginStation = OriginStation;
     this.Scooter       = Scooter;
     this.User          = User;
 }
Ejemplo n.º 5
0
        public void AddScooter(DateTime registerDate, ScooterState state, Station station)
        {
            Scooter scooter = new Scooter(registerDate, state);

            Scooters.Add(scooter);
            if (scooter.IsStateAvailable(state))
            {
                station.AddScooter(scooter);
                scooter.SetStation(station);
            }
        }
Ejemplo n.º 6
0
        public void AddRental(Station OriginStation, Scooter scooter, User User)
        {
            DateTime?EndDate   = null;
            Decimal  Price     = 0;
            DateTime StartDate = DateTime.Now;

            Rental rental = new Rental(EndDate, Price, StartDate, OriginStation, scooter, User);

            Rentals.Add(rental);

            scooter.AddRental(rental); //no se si hay que ponerlo
            OriginStation.AddOriginRental(rental);
            OriginStation.DeleteFirstScooter(scooter);
            // Scooter.StateInUse();
        }
Ejemplo n.º 7
0
 public void SetScooter(Scooter scooterAlquila)
 {
     this.Scooter = scooterAlquila;
 }
Ejemplo n.º 8
0
 public void removeScooter(Scooter sc)
 {
     Scooters.Remove(sc);
 }
Ejemplo n.º 9
0
 public void assignScooter(Scooter sc)
 {
     Scooters.Add(sc);
 }
Ejemplo n.º 10
0
 public void AddScooter(Scooter scooter)
 {
     Scooters.Add(scooter);
 }
Ejemplo n.º 11
0
 public void DeleteFirstScooter(Scooter scooter)
 {
     Scooters.Remove(Scooters.First()); //ayuda esto o el objeto scooter
     scooter.StateInUse();
 }
Ejemplo n.º 12
0
        public Rental(DateTime?EndDate, double Price, DateTime StartDate, Station origin, Scooter scooter, User user)
        {
            this.EndDate = EndDate;

            this.Price     = Price;
            this.StartDate = StartDate;

            this.origin  = origin;
            this.scooter = scooter;
            TrackPoints  = new List <TrackPoint>();
            this.user    = user;
        }
Ejemplo n.º 13
0
 public PlanningWork(String Description, int WorkingTime, Maintenance Maintenance, Scooter Scooter)
 {
     this.Description = Description;
     this.WorkingTime = WorkingTime;
     this.Maintenance = Maintenance;
     this.Scooter     = Scooter;
 }