public FormAjoutEmploye()
        {
            InitializeComponent();
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            List <Role>    listeRoles    = gestionEmployes.findAllRoles();
            List <Ville>   listeVilles   = gestionEmployes.findAllVilles();
            List <Societe> listeSocietes = gestionEmployes.findAllSocietes();

            foreach (Role role in listeRoles)
            {
                ComboboxItem item = new ComboboxItem();
                item.Value = role.IdRole;
                item.Text  = role.CodeRole;

                comboBoxRole.Items.Add(item);
            }
            foreach (Ville ville in listeVilles)
            {
                ComboboxItem item = new ComboboxItem();
                item.Value = ville.IdVille;
                item.Text  = ville.CodeVille;

                comboBoxVille.Items.Add(item);
            }
            foreach (Societe societe in listeSocietes)
            {
                ComboboxItem item = new ComboboxItem();
                item.Value = societe.IdSociete;
                item.Text  = societe.NomSociete;

                comboBoxSociete.Items.Add(item);
            }
        }
        private void btnReset_Click(object sender, EventArgs e)
        {
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            textBoxSearch.Text          = "";
            dataGridSocietes.DataSource = gestionEmployes.findAllSocietes();
        }
        private void btnDeleteSociete_Click(object sender, EventArgs e)
        {
            if (this.dataGridSocietes.SelectedRows.Count > 0)
            {
                int selectedRowIndex = this.dataGridSocietes.SelectedRows[0].Index;
                int IdSociete        = Convert.ToInt32(this.dataGridSocietes.Rows[selectedRowIndex].Cells["IdSociete"].Value);

                IGestionEmployes
                    gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

                gestionEmployes.deleteSociete(IdSociete);
                dataGridSocietes.DataSource = gestionEmployes.findAllSocietes();
            }
        }
        public FormGestionSocietes()
        {
            InitializeComponent();
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            dataGridSocietes.DataSource = gestionEmployes.findAllSocietes();

            List <Utilisateur> listeUtilisateurs = gestionEmployes.findAllUtilisateurs();

            foreach (Utilisateur utilisateur in listeUtilisateurs)
            {
                ComboboxItem item = new ComboboxItem();
                item.Value = utilisateur.IdUtilisateur;
                item.Text  = utilisateur.Prenom.Trim() + " " + utilisateur.Nom.Trim();

                comboBoxUtilisateur.Items.Add(item);
            }
        }