public Borne(int unId, int unIndice, DateTime uneDate, TypeBorne unType) { this.idBorne = unId; this.indiceCompteurUnités = unIndice; this.dateDerniereRevision = uneDate; this.leType = unType; }
public Borne(int unId, int unIndice, DateTime uneDate, TypeBorne unType) { this.idBorne = unId; this.indiceCompteurUnités = unIndice; this.dateDerniereRevision = uneDate; this.leType = unType; }
private void btn_addBorne_Click(object sender, EventArgs e) { int indexStation = lbx_stations.SelectedIndex; int indexBorne = lbx_bornes.SelectedIndex; if (indexStation >= 0) { try { TypeBorne unType = (TypeBorne)cbx_type.SelectedItem; Borne newBorne = new Borne(Convert.ToInt32(txb_idBorne.Text), Convert.ToInt32(txb_indice.Text), unType); Station selectedStation = CRAB.LesStations[indexStation]; CRAB.addBorne(newBorne, indexStation); CRAB.lierBorneStation(selectedStation, lbx_bornes); txb_idBorne.ResetText(); txb_indice.ResetText(); DatePicker.ResetText(); CRAB.lierStations(lbx_stations); cbx_type.SelectedItem = CRAB.LesTypesBornes[0]; } catch (FormatException ex) { MessageBox.Show("Veuillez renseigner ces champs correctement"); } catch (Exception exGeneral) { MessageBox.Show("Une erreur est survenue"); } } }
private string cheminFichier = "donnees.xml"; // Nom du fichier de la maintenance (ex : ile de france) private void Form1_Load(object sender, EventArgs e) { DateTime unedate = new DateTime(2012, 06, 1); List <TypeBorne> desTypes = new List <TypeBorne>();; TypeBorne Type1 = new TypeBorne("NORM", 30, 30, 80); TypeBorne Type2 = new TypeBorne("SEMI", 45, 20, 100); TypeBorne Type3 = new TypeBorne("RAPI", 50, 15, 120); desTypes.Add(Type1); desTypes.Add(Type2); desTypes.Add(Type3); /*List<Borne> S1Bornes = new List<Borne>(); * List<Borne> S2Bornes = new List<Borne>(); * Borne S1B1 = new Borne(1, 20, Type2); * Borne S1B2 = new Borne(2, 110, unedate, Type3); * Borne S2B1 = new Borne(1, 85, Type1); * Borne S2B2 = new Borne(2, 110, unedate, Type2); * Borne S2B3 = new Borne(3, 20, Type2); * S1Bornes.Add(S1B1); * S1Bornes.Add(S1B2); * S2Bornes.Add(S2B1); * S2Bornes.Add(S2B2);*/ List <Station> desStations = new List <Station>(); Station S1 = new Station(1, "Gentilly"); Station S2 = new Station(2, "Cachan"); Station S3 = new Station(3, "Choisy"); desStations.Add(S1); desStations.Add(S2); desStations.Add(S3); List <Technicien> desTechniciens = new List <Technicien>(); Technicien T1 = new Technicien(1, "Legenty", "Geoffrey"); Technicien T2 = new Technicien(2, "Amari", "Sofiane"); Technicien T3 = new Technicien(3, "Magassa", "Nouhou"); desTechniciens.Add(T1); desTechniciens.Add(T2); desTechniciens.Add(T3); CRAB = new Maintenance(desStations, desTechniciens, desTypes); CRAB.GenereVisitesP(); CRAB.lierVisites(lbx_visites, CRAB.LesVisites); }
public Borne(int unId, int unIndice, TypeBorne unType) { this.idBorne = unId; this.indiceCompteurUnités = unIndice; this.leType = unType; }
private void Form1_Load(object sender, EventArgs e) { DateTime unedate = new DateTime(2012, 06, 1); List<TypeBorne> desTypes = new List<TypeBorne>(); ; TypeBorne Type1 = new TypeBorne("NORM", 30, 30, 80); TypeBorne Type2 = new TypeBorne("SEMI", 45, 20, 100); TypeBorne Type3 = new TypeBorne("RAPI", 50, 15, 120); desTypes.Add(Type1); desTypes.Add(Type2); desTypes.Add(Type3); /*List<Borne> S1Bornes = new List<Borne>(); List<Borne> S2Bornes = new List<Borne>(); Borne S1B1 = new Borne(1, 20, Type2); Borne S1B2 = new Borne(2, 110, unedate, Type3); Borne S2B1 = new Borne(1, 85, Type1); Borne S2B2 = new Borne(2, 110, unedate, Type2); Borne S2B3 = new Borne(3, 20, Type2); S1Bornes.Add(S1B1); S1Bornes.Add(S1B2); S2Bornes.Add(S2B1); S2Bornes.Add(S2B2);*/ List<Station> desStations = new List<Station>(); Station S1 = new Station(1, "Gentilly"); Station S2 = new Station(2, "Cachan"); Station S3 = new Station(3, "Choisy"); desStations.Add(S1); desStations.Add(S2); desStations.Add(S3); List<Technicien> desTechniciens = new List<Technicien>(); Technicien T1 = new Technicien(1, "Legenty", "Geoffrey"); Technicien T2 = new Technicien(2, "Amari", "Sofiane"); Technicien T3 = new Technicien(3, "Magassa", "Nouhou"); desTechniciens.Add(T1); desTechniciens.Add(T2); desTechniciens.Add(T3); CRAB = new Maintenance(desStations, desTechniciens,desTypes); CRAB.GenereVisitesP(); CRAB.lierVisites(lbx_visites,CRAB.LesVisites); }
public Borne(int unId, int unIndice, TypeBorne unType) { this.idBorne = unId; this.indiceCompteurUnités = unIndice; this.leType = unType; }