Пример #1
0
        private void botonGuardar_Click(object sender, EventArgs e)
        {
            rolSeleccionado.Nombre = textRol.Text;
            if ((string)comboEstado.SelectedItem == "Activo")
            {
                rolSeleccionado.Estado = true;
            }
            else
            {
                rolSeleccionado.Estado = false;
            }

            if (!DAORol.guardar(rolSeleccionado))
            {
                toolTip.Hide(textRol);
                toolTip.SetToolTip(textRol, "Entrada Invalida");
                toolTip.Show("Ingrese un nombre de Rol Válido.", textRol, 50, 10, 5000);
                return;
            }
            DAOFuncionalidad.updateFuncXRol(rolSeleccionado.Nombre, lista_alta, lista_baja);
            MessageBox.Show("Rol modificado satisfactoriamente.", "Modificar Rol",
                            MessageBoxButtons.OK);

            ((RolBajaMod)Globals.VentanaAnterior).updateGrid();
            this.Close();
        }
Пример #2
0
 private void botonGuardar_Click(object sender, EventArgs e)
 {
     rolSeleccionado.Nombre = (string)textRol.Text;
     if ((string)comboEstado.SelectedItem == "Activo")
     {
         rolSeleccionado.Estado = true;
     }
     else
     {
         rolSeleccionado.Estado = false;
     }
     DAORol.updateRol(rolSeleccionado);
     DAOFuncionalidad.updateFuncXRol(rolSeleccionado.Nombre, lista_alta, lista_baja);
     this.Dispose();
 }