Пример #1
0
        private void dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 0) //modificar rol
            {
                DataGridViewRow filaSeleccionada = dataGridView.Rows[dataGridView.SelectedCells[0].RowIndex];

                String nombre = filaSeleccionada.Cells[2].FormattedValue.ToString();

                FormAltaRol far = new FormAltaRol();

                far.setPadre(this);
                far.setNombreRol(nombre);
                far.Show();
            }
            else if (e.ColumnIndex == 1) //habilitar/deshabilitar rol
            {
                DataGridViewRow filaSeleccionada = dataGridView.Rows[dataGridView.SelectedCells[0].RowIndex];
                String nombre = filaSeleccionada.Cells[2].FormattedValue.ToString();

                Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>();
                camposValores.Add("nombre", new gdDataBase.ValorTipo(nombre, SqlDbType.VarChar));

                var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.Inhabilitar_Habilitar", camposValores);

                dt = new gdDataBase().GetDataWithParameters("ÑUFLO.RolDadoNombre", null);
                cargarDatosEnTabla(dt);
            }
        }
Пример #2
0
        private void altaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Abm_Rol.FormAltaRol formularioAltaRol = new Abm_Rol.FormAltaRol();

            formularioAltaRol.MdiParent = this;

            formularioAltaRol.Show();
        }