public bool ExistErreur()
        {
            DAL.DALDoctorant D = new DAL.DALDoctorant();
            int x = D.ChechkCIN_PasseportUnicity(txtCin.Text);

            if ((txtCin.Text == "") || (txtCin.Text.Length < 8) || (txtNumInsc.Text == "") || (txtNomFr.Text == "") || (txtPrenomFr.Text == "") ||
                (txtNomAr.Text == "") || (txtPrenomAr.Text == "") || (x != 0) ||
                (cmbxSexe.Text == "") || (txtLieuNaiss.Text == "") || (cmbxNationalite.Text == "") || (cmbxCivilite.Text == "") ||
                (txtMail.Text == "") || (IsValidMail(txtMail.Text) == false) || (txtTel.Text == "") ||
                (txtGouvernat.Text == "") || (txtVille.Text == "") || (txtCodePost.Text == "") || (txtAdresse.Text == "")

                || (cmbxDerDiplome.Text == "") || (cmbxEcoleDoctoral.Text == "") || (txtSujet.Text == "")
                //|| (cmbVilleFr.Text == "") ||  || (txtAdresseAr.Text == "")
                //|| (txtCodePostaleFr.Text == "") || (cmbGradeFr.Text == "") || (cmbStatutFr.Text == "") || (cmbAffiliationFr.Text == "")
                //|| (txtRibFr.Text == "") || (txtIdentifiantUnique.Text == "") || (cmbDiplomeFr.Text == "") || (cmbDiplomeFr.Text == "")
                //|| (txtAliasFr.Text == "") || (cmbVilleAr.Text == "")
                )
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public void RemplirFiche()
        {
            DAL.DALDoctorant E = new DAL.DALDoctorant();
            dt10 = E.SelectByCIN_Passeport(CIN_Passeport);

            if ((CIN_Passeport != "") && (E.ChechkCIN_PasseportUnicity(CIN_Passeport) == 1))
            {
                txtCin.Text = dt10.Rows[0][1].ToString().Trim();
            }

            txtNumInsc.Text       = dt10.Rows[0][2].ToString().Trim();
            txtNomFr.Text         = dt10.Rows[0][3].ToString().Trim();
            txtNomAr.Text         = dt10.Rows[0][4].ToString().Trim();
            txtPrenomFr.Text      = dt10.Rows[0][5].ToString().Trim();
            txtPrenomAr.Text      = dt10.Rows[0][6].ToString().Trim();
            txtNomJeuFilleFr.Text = dt10.Rows[0][7].ToString().Trim();
            txtNomJeuFilleAr.Text = dt10.Rows[0][8].ToString().Trim();

            cmbxSexe.Text = dt10.Rows[0][10].ToString().Trim();

            DateTimePickerDateNaissance.Value = (DateTime)(dt10.Rows[0][11]);
            txtLieuNaiss.Text    = dt10.Rows[0][12].ToString().Trim();
            cmbxNationalite.Text = dt10.Rows[0][13].ToString().Trim();
            cmbxPaysOrig.Text    = dt10.Rows[0][14].ToString().Trim();
            cmbxCivilite.Text    = dt10.Rows[0][15].ToString().Trim();
            txtProfession.Text   = dt10.Rows[0][16].ToString().Trim();
            txtEmployeur.Text    = dt10.Rows[0][17].ToString().Trim();

            txtMail.Text    = dt10.Rows[0][18].ToString().Trim();
            txtTel.Text     = dt10.Rows[0][19].ToString().Trim();
            txtAdresse.Text = dt10.Rows[0][20].ToString().Trim();

            txtVille.Text     = dt10.Rows[0][21].ToString().Trim();
            txtGouvernat.Text = dt10.Rows[0][22].ToString().Trim();
            txtCodePost.Text  = dt10.Rows[0][23].ToString().Trim();

            cmbxDerDiplome.Text         = dt10.Rows[0][24].ToString().Trim();
            dateTimePickerDateObt.Value = (DateTime)(dt10.Rows[0][25]);
            txtLieuObtention.Text       = dt10.Rows[0][26].ToString().Trim();

            cmbxEcoleDoctoral.Text = dt10.Rows[0][27].ToString().Trim();
            cmbxSpecialite.Text    = dt10.Rows[0][28].ToString().Trim();
            txtSujet.Text          = dt10.Rows[0][29].ToString().Trim();
            cmbxStatut.Text        = dt10.Rows[0][30].ToString().Trim();
            cmbxEtatPaiAc.Text     = dt10.Rows[0][31].ToString().Trim();
            //cmbxEncadrant.SelectedValue =int.Parse( dt10.Rows[0][30].ToString()); //averifier
            //cmbxCoEncadrant.SelectedValue =int.Parse( dt10.Rows[0][31].ToString());
            TxtObs.Text = dt10.Rows[0][39].ToString().Trim();
            if (dt10.Rows[0][9].ToString() != "")
            {
                byte[]       img = (byte[])(dt10.Rows[0][9]);
                MemoryStream ms  = new MemoryStream(img);
                pictureBox1.Image = Image.FromStream(ms);
            }

            //DAL.DALDossierAffectation DA = new DAL.DALDossierAffectation();
            //dt20 = DA.SelectDossierAffectation(int.Parse(dt10.Rows[0][0].ToString()));
            //cmbDiplomeFr.Text = dt20.Rows[0][2].ToString().Trim();
            //cmbGradeFr.SelectedValue = int.Parse(dt20.Rows[0][3].ToString());
            //txtNiveau.Text = dt20.Rows[0][3].ToString();
        }