internal void togglePanelMain(string panelName)
        {
            this.panelMain.Controls.Clear();
            switch (panelName)
            {
            case "home":
                if (this.uCHome == null)
                {
                    this.uCHome = new Admeli.UCHome(this);
                    this.panelMain.Controls.Add(uCHome);
                    this.uCHome.Dock     = System.Windows.Forms.DockStyle.Fill;
                    this.uCHome.Location = new System.Drawing.Point(0, 0);
                    this.uCHome.Name     = "uCHome";
                    this.uCHome.Size     = new System.Drawing.Size(250, 776);
                    this.uCHome.TabIndex = 0;
                }
                else
                {
                    this.panelMain.Controls.Add(uCHome);
                }
                this.lblTitlePage.Text = "Home - ";     /// Titulo en el encabezado
                break;

            case "compras2":
                if (this.uCCompras == null)
                {
                    this.uCCompras = new UCCompras(this);
                    this.panelMain.Controls.Add(uCCompras);
                    this.uCCompras.Dock     = System.Windows.Forms.DockStyle.Fill;
                    this.uCCompras.Location = new System.Drawing.Point(0, 0);
                    this.uCCompras.Name     = "uCCompras";
                    this.uCCompras.Size     = new System.Drawing.Size(250, 776);
                    this.uCCompras.TabIndex = 0;
                }
                else
                {
                    this.panelMain.Controls.Add(uCCompras);
                }
                this.lblTitlePage.Text = "Compras - Compra";     /// Titulo en el encabezado
                break;

            case "ventas2":
                if (this.uCVentas == null)
                {
                    this.uCVentas = new UCVentas(this);
                    this.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.panelMain.Controls.Add(uCVentas);
                }
                this.lblTitlePage.Text = "Ventas - Venta";     /// Titulo en el encabezado
                break;

            case "productos2":
                if (this.uCListadoProducto == null)
                {
                    this.uCListadoProducto = new UCListadoProducto(this);
                    this.panelMain.Controls.Add(uCListadoProducto);
                    this.uCListadoProducto.Dock     = System.Windows.Forms.DockStyle.Fill;
                    this.uCListadoProducto.Location = new System.Drawing.Point(0, 0);
                    this.uCListadoProducto.Name     = "uCListadoProducto";
                    this.uCListadoProducto.Size     = new System.Drawing.Size(250, 776);
                    this.uCListadoProducto.TabIndex = 0;
                }
                else
                {
                    this.panelMain.Controls.Add(uCListadoProducto);
                }
                this.lblTitlePage.Text = "Productos - Listar";     /// Titulo en el encabezado
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        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;
            }
        }