コード例 #1
0
 private void changeTramStatus(Tram tram, bool defect, bool cleaning)
 {
     if (defect)
     {
         tram.AddStatus(TramStatus.Defect);
     }
     if (cleaning)
     {
         tram.AddStatus(TramStatus.Cleaning);
     }
 }
コード例 #2
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);
            }
        }