private void togglePanelMain(string panelName) { limpiarControles(); switch (panelName) { case "clientes": if (uCClientes == null) { this.uCClientes = new Admeli.Ventas.UCClientes(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCClientes); this.uCClientes.Dock = System.Windows.Forms.DockStyle.Fill; this.uCClientes.Location = new System.Drawing.Point(0, 0); this.uCClientes.Name = "uCClientes"; this.uCClientes.Size = new System.Drawing.Size(250, 776); this.uCClientes.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCClientes); this.uCClientes.reLoad(); } formPrincipal.lblTitlePage.Text = "Venta - Clientes"; /// Titulo en el encabezado break; case "contizacionCliente": if (uCCotizacionCliente == null) { this.uCCotizacionCliente = new Admeli.Ventas.UCCotizacionCliente(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCCotizacionCliente); this.uCCotizacionCliente.Dock = System.Windows.Forms.DockStyle.Fill; this.uCCotizacionCliente.Location = new System.Drawing.Point(0, 0); this.uCCotizacionCliente.Name = "uCCotizacionCliente"; this.uCCotizacionCliente.Size = new System.Drawing.Size(250, 776); this.uCCotizacionCliente.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCCotizacionCliente); this.uCCotizacionCliente.reLoad(); } formPrincipal.lblTitlePage.Text = "Venta - Contizaciones cliente"; /// Titulo en el encabezado break; case "cuentaCobrar": if (uCCuentaCobrar == null) { this.uCCuentaCobrar = new Admeli.Ventas.UCCuentaCobrar(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCCuentaCobrar); this.uCCuentaCobrar.Dock = System.Windows.Forms.DockStyle.Fill; this.uCCuentaCobrar.Location = new System.Drawing.Point(0, 0); this.uCCuentaCobrar.Name = "uCCuentaCobrar"; this.uCCuentaCobrar.Size = new System.Drawing.Size(250, 776); this.uCCuentaCobrar.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCCuentaCobrar); this.uCCuentaCobrar.reLoad(); } formPrincipal.lblTitlePage.Text = "Venta - Cuenta Cobrar"; /// Titulo en el encabezado break; case "ventas": if (uCVentas == null) { this.uCVentas = new Admeli.Ventas.UCVentas(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCVentas); this.uCVentas.Dock = System.Windows.Forms.DockStyle.Fill; this.uCVentas.Location = new System.Drawing.Point(0, 0); this.uCVentas.Name = "uCVentas"; this.uCVentas.Size = new System.Drawing.Size(250, 776); this.uCVentas.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCVentas); this.uCVentas.reLoad(); } formPrincipal.lblTitlePage.Text = "Venta - Ventas"; /// Titulo en el encabezado break; case "ventaTouch": FormVentaTouch ventaTouch = new FormVentaTouch(); ventaTouch.ShowDialog(); break; default: break; } }
private void togglePanelMain(string panelName) { limpiarControles(); switch (panelName) { case "cierreCaja": if (uCCierreCaja == null) { this.uCCierreCaja = new Admeli.CajaBox.UCCierreCaja(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCCierreCaja); this.uCCierreCaja.Dock = System.Windows.Forms.DockStyle.Fill; this.uCCierreCaja.Location = new System.Drawing.Point(0, 0); this.uCCierreCaja.Name = "uCCierreCaja"; this.uCCierreCaja.Size = new System.Drawing.Size(250, 776); this.uCCierreCaja.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCCierreCaja); this.uCCierreCaja.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Caja - Cierre de caja"; break; case "egresos": if (uCEgresos == null) { this.uCEgresos = new Admeli.CajaBox.UCEgresos(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCEgresos); this.uCEgresos.Dock = System.Windows.Forms.DockStyle.Fill; this.uCEgresos.Location = new System.Drawing.Point(0, 0); this.uCEgresos.Name = "uCEgresos"; this.uCEgresos.Size = new System.Drawing.Size(250, 776); this.uCEgresos.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCEgresos); this.uCEgresos.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Caja - Egreso"; break; case "ingresos": if (uCIngresos == null) { this.uCIngresos = new Admeli.CajaBox.UCIngresos(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCIngresos); this.uCIngresos.Dock = System.Windows.Forms.DockStyle.Fill; this.uCIngresos.Location = new System.Drawing.Point(0, 0); this.uCIngresos.Name = "uCIngresos"; this.uCIngresos.Size = new System.Drawing.Size(250, 776); this.uCIngresos.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCIngresos); this.uCIngresos.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Caja - Ingreso"; break; case "iniciarCaja": if (uCIniciarCaja == null) { this.uCIniciarCaja = new Admeli.CajaBox.UCIniciarCaja(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCIniciarCaja); this.uCIniciarCaja.Dock = System.Windows.Forms.DockStyle.Fill; this.uCIniciarCaja.Location = new System.Drawing.Point(0, 0); this.uCIniciarCaja.Name = "uCIniciarCaja"; this.uCIniciarCaja.Size = new System.Drawing.Size(250, 776); this.uCIniciarCaja.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCIniciarCaja); this.uCIniciarCaja.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Caja - Iniciar caja"; break; case "cuentaPorCobrar": if (uCCuentasCobrar == null) { this.uCCuentasCobrar = new Admeli.CajaBox.UCCuentaCobrar(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCCuentasCobrar); this.uCCuentasCobrar.Dock = System.Windows.Forms.DockStyle.Fill; this.uCCuentasCobrar.Location = new System.Drawing.Point(0, 0); this.uCCuentasCobrar.Name = "uCCuentaCobrar"; this.uCCuentasCobrar.Size = new System.Drawing.Size(250, 776); this.uCCuentasCobrar.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCCuentasCobrar); this.uCCuentasCobrar.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Cuentas - Cobrar"; break; case "cuentaPorPagar": if (uCCuentasPagar == null) { this.uCCuentasPagar = new Admeli.CajaBox.UCCuentaPagar(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCCuentasPagar); this.uCCuentasPagar.Dock = System.Windows.Forms.DockStyle.Fill; this.uCCuentasPagar.Location = new System.Drawing.Point(0, 0); this.uCCuentasPagar.Name = "uCCuentaCobrar"; this.uCCuentasPagar.Size = new System.Drawing.Size(250, 776); this.uCCuentasPagar.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCCuentasPagar); this.uCCuentasPagar.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Cuentas - Pagar"; break; case "estadoCajas": if (uCEstadoCajas == null) { //this.uCCierreCaja = new Admeli.CajaBox.UCCierreCaja(this.formPrincipal); this.uCEstadoCajas = new UCEstadoCajas(this.formPrincipal); this.formPrincipal.panelMain.Controls.Add(uCEstadoCajas); this.uCEstadoCajas.Dock = System.Windows.Forms.DockStyle.Fill; this.uCEstadoCajas.Location = new Point(0, 0); this.uCEstadoCajas.Name = "uCEstadoCajas"; this.uCEstadoCajas.Size = new Size(250, 776); this.uCEstadoCajas.TabIndex = 0; } else { this.formPrincipal.panelMain.Controls.Add(uCEstadoCajas); this.uCEstadoCajas.reLoad(); } this.formPrincipal.lblTitlePage.Text = "Caja - Estado de Cajas"; break; default: break; } }