예제 #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;
 }
예제 #3
0
        public Rental(DateTime startDate, Station originStation, Scooter scooter, User user)
        {
            StartDate     = startDate;
            OriginStation = originStation;
            Scooter       = scooter;
            User          = user;

            TrackPoints = new List <TrackPoint>();
        }
예제 #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;
 }
예제 #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);
            }
        }
예제 #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();
        }
예제 #7
0
 public void SetScooter(Scooter scooterAlquila)
 {
     this.Scooter = scooterAlquila;
 }
예제 #8
0
 public void removeScooter(Scooter sc)
 {
     Scooters.Remove(sc);
 }
예제 #9
0
 public void assignScooter(Scooter sc)
 {
     Scooters.Add(sc);
 }
예제 #10
0
 public void AddScooter(Scooter scooter)
 {
     Scooters.Add(scooter);
 }
예제 #11
0
 public void DeleteFirstScooter(Scooter scooter)
 {
     Scooters.Remove(Scooters.First()); //ayuda esto o el objeto scooter
     scooter.StateInUse();
 }
예제 #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;
        }
예제 #13
0
 public PlanningWork(String Description, int WorkingTime, Maintenance Maintenance, Scooter Scooter)
 {
     this.Description = Description;
     this.WorkingTime = WorkingTime;
     this.Maintenance = Maintenance;
     this.Scooter     = Scooter;
 }