示例#1
0
        private void Administrateur_Load(object sender, EventArgs e)
        {
            dgvEmp.Rows.Clear();
            EmployerDAO edao = new EmployerDAO();

            nomUtilisateur = edao.FindNameByid(user);
            //label2.Text = user.ToString();
            label2.Text = nomUtilisateur;

            timer1.Start();
            lblauj.Text   = Convert.ToString(DateTime.Now.ToLongDateString());
            lbltemps.Text = Convert.ToString(DateTime.Now.ToLongTimeString());
            EmployerDAO pd = new EmployerDAO();

            employes = pd.FindAll();
            foreach (Employer mm in employes)
            {
                dgvEmp.Rows.Add(mm.Id, mm.Nom, mm.Prenom, mm.Sexe, mm.DateNaiss.ToShortDateString(), mm.Tel, mm.Email, mm.Type, mm.NomUtilisateur, mm.Password, mm.Adresse, mm.Img, mm.DateInscription);
            }
        }