private void Fconge_employe_Load(object sender, EventArgs e) { Employe E = new Employe(FMenu.C); E.lister(); for (int i = 0; i < E.GetConnextion().dt.Rows.Count; i++) { TxtMatricule.Items.Add(E.GetConnextion().dt.Rows[i][0].ToString()); } }
public void fill_matricule() { TxtMatricule.Items.Clear(); E = new Employe(FMenu.C); E.lister(); DataTable dt = E.GetConnextion().dt; foreach (DataRow row in dt.Rows) { TxtMatricule.Items.Add(row.Field <string>(0)); } }
// ******************************************************************** // Functions public void actualiser() { E = new Employe(FMenu.C); E.lister(); DGV.DataSource = E.GetConnextion().dt; TxtMatricule.Text = ""; TxtNom.Text = ""; TxtPénom.Text = ""; TxtDateNaissance.Text = "__/__/"; TxtGrade.Text = ""; TxtEchelle.Text = ""; TxtCodeService.Text = ""; TxtMatricule.Select(); TxtCodeService.ReadOnly = false; msg.Text = ""; // ---------------------------------------------------------------------------- // HACK TxtDateNaissance.Enter += new System.EventHandler(this.TxtDateNaissance_Enter); TxtDateNaissance.Leave += new System.EventHandler(this.TxtDateNaissance_Leave); // ---------------------------------------------------------------------------- }