Ejemplo n.º 1
0
 private void btnAlta_Click(object sender, EventArgs e)
 {
     selectedRow = dtgRoles.SelectedRows[0];
     dtgRoles.ClearSelection();
     grpRol.Enabled = true;
     grpRoles.Enabled = false;
     txtNombre.Text = "";
     chkHabilitado.Checked = true;
     rol = new DAORol();
     llenarFuncionalidades(DAORol.getFuncionalidadesNuevo());
 }
Ejemplo n.º 2
0
 private void btnModificar_Click(object sender, EventArgs e)
 {
     selectedRow = dtgRoles.SelectedRows[0];
     if (selectedRow.Cells["CODE"].Value != null)
     {
         grpRoles.Enabled = false;
         txtNombre.Text = selectedRow.Cells["Nombre"].Value.ToString();
         chkHabilitado.Checked = (bool)selectedRow.Cells["HAB"].Value;
         rol = new DAORol(selectedCode());
         llenarFuncionalidades(DAORol.getFuncionalidadesRol(selectedCode()));
     }
 }
Ejemplo n.º 3
0
 private void clean()
 {
     grpRol.Enabled = true;
     txtNombre.Text = "";
     lstFuncionalidades.Items.Clear();
     grpRol.Enabled = false;
     dtgRoles.DataSource = DAORol.getRoles();
     grpRoles.Enabled = true;
     rol = null;
 }