private void BtnSupprimer_Click(object sender, EventArgs e) { if (TxtMatricule.Text == "") { msg_error("matricule non valide"); return; } if (MessageBox.Show("Etes vous sùr de vouloir supprimer l'employe " + TxtMatricule.Text, "Confirmer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { msg_success("suppression annulée"); return; } E = new Employe(TxtMatricule.Text, FMenu.C); E.supprimer(); actualiser(); msg_success("suppression effectuée"); }
// ******************************************************************** // 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); // ---------------------------------------------------------------------------- }
public Conge(Employe emp, Connexion c) { this.employe = emp; this.con = c; }
public Conge(Employe emp, DateTime date, Connexion c) { this.employe = emp; this.date_conge = date; this.con = c; }
private void TxtRecherchNom_TextChanged(object sender, EventArgs e) { E = new Employe(FMenu.C); E.rechercher_nom(TxtRecherchNom.Text); DGV.DataSource = E.GetConnextion().dt; }