Exemplo n.º 1
0
        public IActionResult Index(ConductorView Model)
        {
            try
            {
                if (Model.TramNumber != 0)
                {
                    conductorLogic.AddTramToCleaning(Model);
                }

                return(Index());
            }
            catch
            {
                return(Index());
            }
        }
Exemplo n.º 2
0
 public void AddTramToCleaning(ConductorView Train)
 {
     if (Train.Cleaning == true)
     {
         CleaningDTO cleaning = new CleaningDTO()
         {
             TramNumber = Train.TramNumber, Annotation = "de tram licht vol met bierblikjes van carnaval."
         };
         DataBase.AddCleaning(cleaning);
     }
     if (Train.Maintenance == true)
     {
         MaintenanceDTO maintenance = new MaintenanceDTO()
         {
             TramNumber = Train.TramNumber, Annotation = "de trams remmen maken een gek geluid"
         };
         DataBase.AddService(maintenance);
     }
 }
Exemplo n.º 3
0
        public IActionResult Index()
        {
            ConductorView Model = new ConductorView();

            return(View(Model));
        }