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 } }
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); } }
private bool CheckIfTramIsAllowed(string tramNumber, Tram _tramlogic) { return(_tramlogic.CheckIfTramExists(tramNumber)); }
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(); }
public static void AllocateTramToService(Tram tram) { //if tram has a status, send to repair / cleaning service throw new NotImplementedException(); }
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(); }
public void AddTram(Tram tram) { throw new NotImplementedException(); //voeg tram toe aan database //voeg tram toe aan icollection }
public void CheckTramType(Tram tram) { throw new NotImplementedException(); }
private bool CheckIfTramIsAllowed(Tram tram) { //check if the tram is allowed throw new NotImplementedException(); }