Example #1
0
        public void getParticipatesReadable()
        {
            try
            {
                MDI_DB.Participe oParticipe = new MDI_DB.Participe();
                MDI_DB.Classe    oClasse    = new MDI_DB.Classe();
                MDI_DB.Students  oStudents  = new MDI_DB.Students();

                List <dynamic> lReadable = new List <dynamic>();

                foreach (ModeleParticipe oMPart in oParticipe.Participe_SelectAll())
                {
                    string   stuPre  = oStudents.Students_SelectOne(oMPart.Stu_Id).Prenom;
                    string   stuNom  = oStudents.Students_SelectOne(oMPart.Stu_Id).Nom;
                    string   claLib  = oClasse.Classe_SelectOne(oMPart.Clas_Id).Lib;
                    DateTime lastUpd = oMPart.LastUpd;

                    lReadable.Add(new ModeleParticipeReadable(stuNom, stuPre, claLib, lastUpd));
                }

                dataGrid.DataSource = lReadable;
            }
            catch (BusinessError be)
            {
                MessageBox.Show(be.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void getListed()
        {
            try
            {
                MDI_DB.Participe oParticipe = new MDI_DB.Participe();
                MDI_DB.Classe    oClasse    = new MDI_DB.Classe();
                MDI_DB.Students  oStudents  = new MDI_DB.Students();

                List <string> lEtudiant = new List <string>();
                lClasse.Clear();
                cb_Etudiant.Items.Clear();

                foreach (ModeleParticipe oMPart in oParticipe.Participe_SelectAll())
                {
                    string stuPre = oStudents.Students_SelectOne(oMPart.Stu_Id).Prenom;
                    string stuNom = oStudents.Students_SelectOne(oMPart.Stu_Id).Nom;
                    string claLib = oClasse.Classe_SelectOne(oMPart.Clas_Id).Lib;

                    cb_Etudiant.Items.Add(stuPre + " - " + stuNom);
                    lClasse.Add(claLib);
                }

                getClasses();
            }
            catch (BusinessError be)
            {
                MessageBox.Show(be.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #3
0
 private void getParticipates()
 {
     try
     {
         MDI_DB.Participe oParticipe = new MDI_DB.Participe();
         dataGrid.DataSource = oParticipe.Participe_SelectAll();
     }
     catch (BusinessError be)
     {
         MessageBox.Show(be.Message);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }