private void MenuAdministracionEdsInicio(object sender, EventArgs e) { try { bool enEjecucion; // comprobando la cantidad de elementos del array enEjecucion = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1; if (enEjecucion) { //this.Close(); } oEmpleados.Visible = false; this.panel1.Controls.Add(oEmpleados); oTipoVehiculo.Visible = false; this.panel1.Controls.Add(oTipoVehiculo); oChips.Visible = false; this.panel1.Controls.Add(oChips); oResolucionCanastilla.Visible = false; this.panel1.Controls.Add(oResolucionCanastilla); ValidarUsuario validacion = new ValidarUsuario(); validacion.ShowDialog(); if (_UserId == null) { // this.Close(); this.Dispose(); } } catch (Exception ex) { throw ex; } }
private void MenuGerenciamientoInicio(object sender, EventArgs e) { try { bool enEjecucion; // comprobando la cantidad de elementos del array enEjecucion = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1; if (enEjecucion) { //this.Close(); } oCliente.Visible = false; oCliente.MostrarVehiculo += new PosStation.gsClientes.WorkerEndHandler(this.oCliente_MostrarVehiculo); oCliente.oClosed += new System.EventHandler(this.oCliente_oClosed); this.Controls.Add(oCliente); oCreditos.Visible = false; oCreditos.oClosed += new System.EventHandler(this.oCreditos_oClosed); this.Controls.Add(oCreditos); oVehiculo.Visible = false; oVehiculo.MostrarCredito += new gasolutions.WorkerEndHandler(oVehiculo_MostrarCredito); oVehiculo.oClosed += new System.EventHandler(this.oVehiculo_oClosed); this.Controls.Add(oVehiculo); oRestriccion.Visible = false; oRestriccion.oClosed += new System.EventHandler(oRestriccion_oClosed); this.Controls.Add(oRestriccion); oRecargas.Visible = false; oRecargas.oClosed += new System.EventHandler(oRecargas_oClosed); this.Controls.Add(oRecargas); oKilometraje.Visible = false; oKilometraje.oClosed += new System.EventHandler(oKilometraje_oClosed); this.Controls.Add(oKilometraje); oPrecioCliente.Visible = false; oPrecioCliente.oClosed += new System.EventHandler(oPrecioCliente_oClosed); this.Controls.Add(oPrecioCliente); oRenovarCredito.Visible = false; oRenovarCredito.oClosed += new System.EventHandler(this.oRenovarCredito_oClosed); this.Controls.Add(oRenovarCredito); oTarjeta.Visible = false; oTarjeta.oClosed += new System.EventHandler(this.oCreditos_oClosed); this.Controls.Add(oTarjeta); ValidarUsuario validacion = new ValidarUsuario(); validacion.ShowDialog(); if (_UserId == null) { // this.Close(); this.Dispose(); } } catch (Exception ex) { throw ex; } }