private void VentanaPrincipal_Load(object sender, EventArgs e) { ConexionBaseDeDatos.Logear(empleado, usuario, "Inicio sesion"); cargo = ConexionBaseDeDatos.ObtenerCargo(empleado); switch (cargo) { case 1: inventarioToolStripMenuItem.Enabled = true; productosToolStripMenuItem.Enabled = true; usuariosToolStripMenuItem.Enabled = true; historialToolStripMenuItem.Enabled = true; break; case 2: inventarioToolStripMenuItem.Enabled = true; productosToolStripMenuItem.Enabled = true; usuariosToolStripMenuItem.Enabled = false; historialToolStripMenuItem.Enabled = false; break; case 3: inventarioToolStripMenuItem.Enabled = true; productosToolStripMenuItem.Enabled = false; usuariosToolStripMenuItem.Enabled = false; historialToolStripMenuItem.Enabled = false; break; case 4: inventarioToolStripMenuItem.Enabled = false; productosToolStripMenuItem.Enabled = false; usuariosToolStripMenuItem.Enabled = false; historialToolStripMenuItem.Enabled = false; break; } }