コード例 #1
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dt_usuarios.SelectedRows.Count > 0)
     {
         int id = (int)dt_usuarios.SelectedRows[0].Cells[0].Value;
         GUI.UsuarioEditar f = new UsuarioEditar(id);
         f.Show();
     }
     else
     {
         MessageBox.Show("Seleccione un usuario");
     }
 }
 private void btn_Aceptar_Click(object sender, EventArgs e)
 {
     if (dt_Empleados.SelectedRows.Count > 0)
     {
         int ide = int.Parse(dt_Empleados.SelectedRows[0].Cells[0].Value.ToString());
         if (orig)
         {
             GUI.UsuarioNuevo f = new UsuarioNuevo(ide, c, u, rol);
             f.Show();
             this.Close();
         }
         else
         {
             GUI.UsuarioEditar f = new UsuarioEditar(id, ide, c, u, rol);
             f.Show();
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("Seleccione el Empleado");
     }
 }