private void PageNavire_Loaded(object sender, RoutedEventArgs e) { ComboBoxNumCom.DataContext = AccesAuxDonneesCommandant.ChargerCommandants(); ComboBoxCodPor.DataContext = AccesAuxDonneesPort.ChargerPorts(); ComboBoxCTyNav.DataContext = AccesAuxDonneesTypeNavire.ChargerTypeNavire(); ComboBoxNumArm.DataContext = AccesAuxDonneesArmateur.ChargerArmateurs(); }
private void buttonMaj_Click(object sender, RoutedEventArgs e) { Port PortAModifier = (Port)dataGridListePort.SelectedValue; AccesAuxDonneesPort.ModifierPort(PortAModifier); dataGridListePort.Items.Refresh(); }
private void buttonSupprimer_Click(object sender, RoutedEventArgs e) { Port PortASupprimer = (Port)dataGridListePort.SelectedValue; AccesAuxDonneesPort.SupprimerPort(PortASupprimer); LesPorts.Remove(PortASupprimer); dataGridListePort.Items.Refresh(); }
private void buttonEnregistrer_Click(object sender, RoutedEventArgs e) { LePort.CodePav = ComboBoxCodPav.Text; AccesAuxDonneesPort.AjouterPort(LePort);// Insertion de l'objet dans le BD // Raz des TextBox textBoxCodePort.Text = ""; textBoxNomPort.Text = ""; ComboBoxCodPav.Text = ""; }
private void Page_Loaded(object sender, RoutedEventArgs e) { LesPilotes = AccesAuxDonneesPilote.ChargerPilotes(); ComboBoxPiloteArrivee.DataContext = LesPilotes; ComboBoxPiloteDepart.DataContext = LesPilotes; LesAgents = AccesAuxDonneesAgent.ChargerAgents(); ComboBoxAgent.DataContext = LesAgents; LesNavires = AccesAuxDonneesNavire.ChargerNavires(); ComboBoxNumLlyods.DataContext = LesNavires; LesPorts = AccesAuxDonneesPort.ChargerPorts(); ComboBoxPorProv.DataContext = LesPorts; ComboBoxPorDest.DataContext = LesPorts; LesTypesDeCargaisons = AccesAuxDonneesTypesDeCargaisons.ChargerTypesDeCargaisons(); ComboBoxTypeFret.DataContext = LesTypesDeCargaisons; }
public PageListePort() { InitializeComponent(); LesPorts = AccesAuxDonneesPort.ChargerPorts(); this.DataContext = LesPorts; }