Пример #1
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();
            }
        }