Esempio n. 1
0
 /// <summary>
 ///     Constructs the class with the given parameters
 /// </summary>
 public Schoonmaak(Medewerker medewerker, DateTime date, Tram tram, SchoonmaakType type)
 {
     Medewerker = medewerker;
     Date       = date;
     Tram       = tram;
     Type       = type;
 }
Esempio n. 2
0
 /// <summary>
 ///     Contructs the maintenance with the given values
 /// </summary>
 public Maintenance(Medewerker medewerker, DateTime date, Tram tram, MaintenanceType type)
 {
     Medewerker = medewerker;
     Date = date;
     Tram = tram;
     Type = type;
 }
Esempio n. 3
0
 /// <summary>
 ///     Contructs the maintenance with the given values
 /// </summary>
 public Maintenance(Medewerker medewerker, DateTime date, Tram tram, MaintenanceType type)
 {
     Medewerker = medewerker;
     Date       = date;
     Tram       = tram;
     Type       = type;
 }
Esempio n. 4
0
 /// <summary>
 ///     Constructs the class with the given parameters
 /// </summary>
 public Schoonmaak(Medewerker medewerker, DateTime date, Tram tram, SchoonmaakType type)
 {
     Medewerker = medewerker;
     Date = date;
     Tram = tram;
     Type = type;
 }
Esempio n. 5
0
        /// <summary>
        ///     On launch we get pick a tram from the list which is the one being ridden by the driver.
        /// </summary>
        public DriversForm()
        {
            InitializeComponent();

            List<Tram> tramList = Database.GetAllTrams().ToList();
            int id = Database.GetRandomTramIdNotRemise(tramList.Count);
            _tram = tramList.First(t => t.Id == id);
            tbTramNummer.Text = _tram.Nummer.ToString();
            lbTramNummer.Text = _tram.Nummer.ToString();
        }
Esempio n. 6
0
        /// <summary>
        ///     Updates the tram with the provided info
        /// </summary>
        /// <param name="tram"></param>
        public static int UpdateTram(Tram tram)
        {
            string query =
                $"UPDATE Tram SET \"Nummer\" = {tram.Nummer}, \"Lengte\" = {tram.Lengte}, " +
                $"\"Vervuild\" = {Convert.ToInt32(tram.Vervuild)}, \"Defect\" = {Convert.ToInt32(tram.Defect)}, " +
                $"\"ConducteurGeschikt\" = {Convert.ToInt32(tram.ConducteurGeschikt)}, \"Beschikbaar\" = {Convert.ToInt32(tram.Beschikbaar)}, " +
                $"\"Tramtype_ID\" = {tram.TramTypeId}, \"Remise_ID_Standplaats\" = {tram.RemiseId} WHERE Id = {tram.Id}";

            return(ExecuteNonQuery(query));
        }