private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         MatiereDAO.Delete_client(int.Parse(txt_ID.Text));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void modifier_Click(object sender, EventArgs e)
 {
     try
     {
         MatiereDAO.Update_client(int.Parse(tbID.Text), tbnom.Text, int.Parse(tbnniv.Text));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void Ajouter_Click(object sender, EventArgs e)
 {
     try
     {
         MatiereDAO.Insert_client(tbnom.Text, int.Parse(tbnniv.Text));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         List <Matieres> ListClients = MatiereDAO.Get_clients(int.Parse(tbnivlist.Text));
         grid_clients.DataSource = ListClients;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                Matieres clt = MatiereDAO.Get_client_ID(int.Parse(tbID.Text));
                tbnom.Text = clt.Nom;

                tbnniv.Text = clt.num_niv.ToString();
                List <Matieres> L = new List <Matieres>();
                L.Add(clt);
                grid_clients.DataSource = L;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #6
0
        private void btn_valider_Click(object sender, RoutedEventArgs e)
        {
            this.SwipeMessages();
            List <Formation> lstSelectedFormation = new List <Formation>();

            foreach (Nameable nam in ((MutliSelectPickList)this.MultiSelect.Content).GetSelectedObjects())
            {
                lstSelectedFormation.Add((Formation)nam);
            }
            try
            {
                Matiere formation = MatiereDAO.CreerMatiere(this.tb_nomMatiere.Text, lstSelectedFormation);
            }
            catch (Exception error)
            {
                this.tbk_error.Text       = "Erreur : " + error.Message;
                this.tbk_error.Visibility = Visibility.Visible;
                return;
            }
            this.tbk_statut.Text       = "Matière Ajoutée.";
            this.tbk_statut.Visibility = Visibility.Visible;
        }
Пример #7
0
        private void mi_ajout_formateur_Click(object sender, RoutedEventArgs e)
        {
            AjoutFormateur ajoutFormateur = new AjoutFormateur(MatiereDAO.GetAll());

            this.Ajout.Content = ajoutFormateur;
        }
Пример #8
0
 public MatiereBLL()
 {
     Dao = new MatiereDAO();
 }