public Eleve bValidElv_Click_2(Niveau niveau, Eleve eleve, String CheckDispoF)
 {
     List<DTO.Niveau> niveaux = DAO.Niveau.getNiveauxParLib(niveau.lib_niveau);
     eleve.idniveau = niveaux[0].id_niveau;
     eleve = DAO.Eleve.insertEleve(eleve, CheckDispoF);
     return eleve;
 }
Beispiel #2
0
        //to continue
        public static EleveClientNiveau getEleveParClientEtNiveau()
        {
            Eleve e = new Eleve();
            Client c = new Client();
            Niveau n = new Niveau();

            //apply request

            //Store result in objet

            //which incidence if I get all columns
            MySqlCommand command = null;


            try
            {
                command = DB.getConnection().CreateCommand();
                command.CommandText = EleveClientNiveau.getEleveParClientEtNiveauRequest();

                //TTTOOOOOOOOOODDDDDDDDDDDDDDDDOOOOOOOOOOO
            }
            catch (Exception)
            {

            }
            finally
            {
                DB.Close();
            }

            return new EleveClientNiveau(e, c, n);
        }
 public Ajout_clients_Eleves()
 {
     InitializeComponent();
     FillCombo();
     fermer_ajout_eleve();
     fermer_vente();
     fermer_matiere();
     client = new Client();
     niveau = new Niveau();
     matiere = new Matiere();
     vente = new Vente();
     eleve = new Eleve();
     eleveMatiere = new EleveMatiere();
 }
        private void bValidElv_Click_2(object sender, EventArgs e)
        {
            string CheckDispoF = "";
            CheckDispoF = checkMajDispo();
            //--------------------------------Ajouter Un Eleve----------------------------
            Client client = new Client();
            client.id_client = Int32.Parse(lIDcli.Text);
            Niveau niveau = new Niveau();
            niveau.lib_niveau = cbNiveau.Text;
            Eleve eleve = new Eleve();
            eleve.nom_ele = tNonElev.Text;
            eleve.prenom_ele = TprenomElv.Text;
            eleve.hf_ele = cbHFelv.Text;
            eleve.systeme_ele = tSystmElve.Text;
            eleve.etablissement_ele = tEtabElv.Text;
            eleve.tel_ele = tTelElv.Text;
            eleve.nbr_heures_seance = tNbrHsé.Text;
            eleve.nbr_heures_semaine = tNbrHsem.Text;
            eleve.remarques_ele = tRqElv.Text.Replace("'", "''");

            eleve.idclient = client.id_client;
            eleve = controller.bValidElv_Click_2(niveau, eleve, CheckDispoF);

            if (eleve != null)
            {
                lIDelveVnt.Text = eleve.id_eleve.ToString();
                lIDcliElvVnt.Text = eleve.idclient.ToString();
                lNomElvVent.Text = eleve.nom_ele;
                lPrenomElevVent.Text = eleve.prenom_ele;
            }



            initializeFields();
            Vider_Case_Coché();


            ouvrir_vente();
            tabControl1.SelectTab(2);

        }
Beispiel #5
0
 private EleveClientNiveau(Eleve e, Client c, Niveau n)
 {
     this.eleve = e;
     this.client = c;
     this.niveau = n;
 }