private void frmCompras_Disposed(object sender, EventArgs e) { isComprasShow = false; frmCompras = new Compras_form(this.usuario, this.paquete); frmCompras.Disposed += new EventHandler(frmCompras_Disposed); }
public Contenedor(Usuarios usuario) { InitializeComponent(); this.usuario = usuario; frmPrinc = new Principalito_form(usuario); frmPrinc.MdiParent = this; frmPrinc.Show(); isPrinc = true; frmVentas = new Ventas_Form(this.usuario, this.paquete); frmVentas.Disposed += new EventHandler(frmVentas_Disposed); frmVentas2 = new Ventas_Form(this.usuario, this.paquete); frmVentas2.Disposed += new EventHandler(frmVentas_Disposed2); frmofertas = new Ofertas_form(usuario); frmofertas.Disposed += new EventHandler(frmOfertas_Disposed); frmClientes = new Clientes_Form(usuario); frmClientes.Disposed += new EventHandler(frmClientes_Disposed); frmCredito = new Credito_form(usuario); frmCredito.Disposed += new EventHandler(frmCredito_Disposed); frmUsuarios = new Usuarios_Form(usuario); frmUsuarios.Disposed += new EventHandler(frmUsuarios_Disposed); frmProveedores = new Proveedores_Form(); frmProveedores.Disposed += new EventHandler(frmProveedores_Disposed); frmCreditoProve = new Proveedor_Credito_form_(this.usuario); frmCreditoProve.Disposed += new EventHandler(frmCreditoProve_Disposed); frmBuscaCodigo = new Buscador_form(); frmBuscaCodigo.Disposed += new EventHandler(frmBuscaCodigo_Disposed); frmCompras = new Compras_form(usuario, this.paquete); frmCompras.Disposed += new EventHandler(frmCompras_Disposed); frmBuscaNombre = new Buscador_form_nombre(); frmBuscaNombre.Disposed += new EventHandler(frmBuscaNombre_Disposed); frmInventario = new Inventario_Form(usuario, this.paquete); frmInventario.Disposed += new EventHandler(frmInventario_Disposed); frmCorteRango = new Corte_por_rango_form(usuario); frmCorteRango.Disposed += new EventHandler(frmCorteRango_Disposed); frmGenCodi = new Generar_codigos_form(usuario); frmGenCodi.Disposed += new EventHandler(frmGenCodi_Disposed); frmConfig = new Configuracion(); frmConfig.Disposed += new EventHandler(frmConfig_Disposed); frmCorteDia = new Corte_por_dia_form(usuario); frmCorteDia.Disposed += new EventHandler(frmCorteDia_Disposed); frmCorteCompras = new CorteCompas(this.usuario); frmCorteCompras.Disposed += new EventHandler(frmCorteCompras_Disposed); frmImporExp = new Importar_Exportar_form(); frmImporExp.Disposed += new EventHandler(frmImporExp_Disposed); frmCorteDiaEspecifico = new Corte_Dia_especifico_form(this.usuario); frmCorteDiaEspecifico.Disposed += new EventHandler(frmCorteDiaEspecifico_Disposed); frmPaquete = new Paquetes_form(); frmPaquete.Disposed += new EventHandler(frmComercial_Disposed); frmCorreo = new correos_form(); frmCorreo.Disposed += new EventHandler(frmCorreo_Disposed); frmResumenComprasID = new resumen_compras_id_form(usuario); frmResumenComprasID.Disposed += new EventHandler(frmResumenCompraId_Disposed); frmResumenComprasDias = new resumen_compras_dia_form(usuario); frmResumenComprasDias.Disposed += new EventHandler(frmResumenCompraDia_Disposed); Paquetes paquete = new DAOPaquetes().GetPaqueteActivado(); if (paquete == null) { ofertasToolStripMenuItem.Enabled = true; clientesToolStripMenuItem1.Enabled = true; créditosToolStripMenuItem.Enabled = true; corteDeUnDíaEspecificoToolStripMenuItem.Enabled = true; cortePorRangoToolStripMenuItem.Enabled = true; //corteDeCompraToolStripMenuItem.Enabled = true; usuariosToolStripMenuItem.Enabled = true; proveedoresToolStripMenuItem.Enabled = true; créditoAProveedoresToolStripMenuItem.Enabled = true; corteDelDíaToolStripMenuItem.Enabled = true; generarCódigosToolStripMenuItem.Enabled = true; importarExportarToolStripMenuItem.Enabled = true; correosToolStripMenuItem.Enabled = true; this.paquete = new Paquetes(); this.paquete.nombre = "Limitado"; this.paquete.activado = "1"; } else if (paquete.Id == 1) { ofertasToolStripMenuItem.Enabled = true; clientesToolStripMenuItem1.Enabled = false; créditosToolStripMenuItem.Enabled = false; corteDeUnDíaEspecificoToolStripMenuItem.Enabled = false; cortePorRangoToolStripMenuItem.Enabled = false; correosToolStripMenuItem.Enabled = true; //corteDeCompraToolStripMenuItem.Enabled = false; usuariosToolStripMenuItem.Enabled = true; proveedoresToolStripMenuItem.Enabled = false; créditoAProveedoresToolStripMenuItem.Enabled = false; generarCódigosToolStripMenuItem.Enabled = false; importarExportarToolStripMenuItem.Enabled = true; this.paquete = paquete; } else if (paquete.Id == 2) { ofertasToolStripMenuItem.Enabled = true; clientesToolStripMenuItem1.Enabled = true; créditosToolStripMenuItem.Enabled = true; corteDeUnDíaEspecificoToolStripMenuItem.Enabled = true; cortePorRangoToolStripMenuItem.Enabled = false; //corteDeCompraToolStripMenuItem.Enabled = false; usuariosToolStripMenuItem.Enabled = true; proveedoresToolStripMenuItem.Enabled = false; créditoAProveedoresToolStripMenuItem.Enabled = false; generarCódigosToolStripMenuItem.Enabled = false; importarExportarToolStripMenuItem.Enabled = true; this.paquete = paquete; } else if (paquete.Id == 3) { ofertasToolStripMenuItem.Enabled = true; clientesToolStripMenuItem1.Enabled = true; créditosToolStripMenuItem.Enabled = true; corteDeUnDíaEspecificoToolStripMenuItem.Enabled = true; cortePorRangoToolStripMenuItem.Enabled = true; //corteDeCompraToolStripMenuItem.Enabled = true; usuariosToolStripMenuItem.Enabled = true; proveedoresToolStripMenuItem.Enabled = true; créditoAProveedoresToolStripMenuItem.Enabled = true; generarCódigosToolStripMenuItem.Enabled = true; importarExportarToolStripMenuItem.Enabled = true; this.paquete = paquete; } }