Пример #1
0
        private void btnReset_Click(object sender, EventArgs e)
        {
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            textBoxSearch.Text      = "";
            dataGridRole.DataSource = gestionEmployes.findAllRoles();
        }
Пример #2
0
        public FormGestionRoles()
        {
            InitializeComponent();
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            dataGridRole.DataSource = gestionEmployes.findAllRoles();
        }
Пример #3
0
        private void btnDeleteRole_Click(object sender, EventArgs e)
        {
            if (this.dataGridRole.SelectedRows.Count > 0)
            {
                IGestionEmployes
                    gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

                int selectedRowIndex = this.dataGridRole.SelectedRows[0].Index;
                int IdRole           = Convert.ToInt32(this.dataGridRole.Rows[selectedRowIndex].Cells["IdRole"].Value);

                gestionEmployes.deleteRole(IdRole);
                dataGridRole.DataSource = gestionEmployes.findAllRoles();
            }
        }
        public FormGestionEmployes()
        {
            InitializeComponent();
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            dataEmployes.DataSource = gestionEmployes.findAllUtilisateurs();

            List <Role> listeRoles = gestionEmployes.findAllRoles();

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

                comboBoxRole.Items.Add(item);
            }
        }