private void Classe_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.Classe.Text != "")
     {
         this.Tarif.ItemsSource   = DAL_Tarif.SelectNomTarifsByClasse(DAL_Classe.FindByName(this.Classe.Text).Id);
         this.Tarif.SelectedValue = DAL_Tarif.SelectNomTarifsByClasse(DAL_Classe.FindByName(this.Classe.Text).Id).First();
     }
 }
        private void Nouveau_tarifvol_click(object sender, RoutedEventArgs e)
        {
            float prix;

            if (float.TryParse(Prix.Text, out prix))
            {
                DAL_TarifVol.AjouterTarifVol(DAL_Tarif.FindByNameAndClasse(DAL_Classe.FindByName(Classe.Text).Id, Tarif.Text).Id, vol, prix);
                AfficherTarifVol();
            }
        }
        public TarifVolPage(int _vol)
        {
            vol = _vol;
            InitializeComponent();
            AfficherTarifVol();

            this.Classe.ItemsSource   = DAL_Classe.SelectNomClasses();
            this.Classe.SelectedValue = DAL_Classe.SelectNomClasses().First();

            this.Tarif.ItemsSource   = DAL_Tarif.SelectNomTarifsByClasse(DAL_Classe.FindByName(this.Classe.Text).Id);
            this.Tarif.SelectedValue = DAL_Tarif.SelectNomTarifsByClasse(DAL_Classe.FindByName(this.Classe.Text).Id).First();
        }
Exemplo n.º 4
0
        public Billet(int _id, int _client, int _vol, DateTime _date)
        {
            this.id     = _id;
            this.client = _client;

            Tarif.Tarif t = DAL_Tarif.GetTarif(DAL_TarifVol.GetTarifVol(_vol).Tarif);
            this.classe = DAL_Classe.GetClasse(t.Classe).Nom;
            this.tarif  = t.Nom;
            this.prix   = DAL_TarifVol.GetTarifVol(_vol).Prix;

            Vol.Vol vol = DAL_Vol.GetVol(DAL_TarifVol.GetTarifVol(_vol).Vol);
            this.trajet  = vol.StrTrajet;
            this.depart  = vol.Depart;
            this.arrivee = vol.Arrivee;

            this.date = _date;
        }