private void changeTramStatus(Tram tram, bool defect, bool cleaning)
 {
     if (defect)
     {
         tram.AddStatus(TramStatus.Defect);
     }
     if (cleaning)
     {
         tram.AddStatus(TramStatus.Cleaning);
     }
 }
 public void ReceiveTram(Tram tram, bool defect, bool cleaning)
 {
     //kijken of de tram bij onze remise naar binnen mag komen
     if (CheckIfTramIsAllowed(tram))
     {
         changeTramStatus(tram, defect, cleaning);
         AllocationManager.AllocateTramToService(tram);
         AllocationManager.AllocateTramToTrack(tram);
     }
     else
     {
         //tram terugsturen / weigeren
     }
 }
Esempio n. 3
0
        private void changeTramStatus(TramDTO tram, bool repairstatus, bool cleanstatus, Tram _tramlogic, string statusDescription)
        {
            StatusDTO statusInDepot = new StatusDTO();

            statusInDepot.Status = TramStatus.Depot;
            _tramlogic.AddStatus(statusInDepot, tram);

            if (repairstatus)
            {
                StatusDTO status = new StatusDTO();
                status.Status      = TramStatus.Defect;
                status.Description = statusDescription;
                _tramlogic.AddStatus(status, tram);
            }
            if (cleanstatus)
            {
                StatusDTO status = new StatusDTO();
                status.Status = TramStatus.Cleaning;
                _tramlogic.AddStatus(status, tram);
            }
        }
Esempio n. 4
0
 private bool CheckIfTramIsAllowed(string tramNumber, Tram _tramlogic)
 {
     return(_tramlogic.CheckIfTramExists(tramNumber));
 }
Esempio n. 5
0
 public Depot(Track tracklogic, Tram tramlogic, IDepotAccess depotAccess)
 {
     this._tracklogic  = tracklogic;
     this._tramlogic   = tramlogic;
     this._depotaccess = depotAccess;
 }
 public void SmallService(Tram tram)
 {
     throw new NotImplementedException();
 }
 public bool BigService(Tram tram)
 {
     throw new NotImplementedException();
 }
 public void AddTram(Tram tram)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 public static void AllocateTramToService(Tram tram)
 {
     //if tram has a status, send to repair / cleaning service
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public static void AllocateTramToTrack(Tram tram)
 {
     //if status defect send to a repairservice track. check each time if it's possible
     //otherwise send to a normal track. check each time if it's possible
     throw new NotImplementedException();
 }
Esempio n. 11
0
 public void AddTram(Tram tram)
 {
     throw new NotImplementedException();
     //voeg tram toe aan database
     //voeg tram toe aan icollection
 }
Esempio n. 12
0
 public void CheckTramType(Tram tram)
 {
     throw new NotImplementedException();
 }
 private bool CheckIfTramIsAllowed(Tram tram)
 {
     //check if the tram is allowed
     throw new NotImplementedException();
 }