Esempio n. 1
0
        private void OpcionMenu_Click(object sender, EventArgs e)
        {
            if (((ToolStripMenuItem)sender).Name == "mnuProductos")
            {
                frmProductos2 frm = new frmProductos2();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuCategoriaProductos")
            {
                frmCategoriaProducto frm = new frmCategoriaProducto();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }


            else if (((ToolStripMenuItem)sender).Name == "mnuMedidasProductos")
            {
                frmTipoMedida frm = new frmTipoMedida();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuClientes")
            {
                frmClientes frm = new frmClientes();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuTipoClientes")
            {
                frmTipoCliente frm = new frmTipoCliente();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuProveedores")
            {
                frmProveedores2 frm = new frmProveedores2();
                // frm.MdiParent = this;
                frm.Show();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuEmpleados")
            {
                frmEmpleado frm = new frmEmpleado();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuIngredientes")
            {
                frmIngredientes frm = new frmIngredientes();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuTipoIngredientes")
            {
                frmTipoIngrediente frm = new frmTipoIngrediente();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuMonedas")
            {
                frmMoneda frm = new frmMoneda();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }

            else if (((ToolStripMenuItem)sender).Name == "mnuTipoMonedas")
            {
                frmMoneda2 frm = new frmMoneda2();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuPuestos")
            {
                frmPuestos frm = new frmPuestos();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuCajas")
            {
                frmCajas frm = new frmCajas();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuTipoMovimientos")
            {
                frmTiposMovimiento frm = new frmTiposMovimiento();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuFacturacion")
            {
                frmFacturacion1 frm = new frmFacturacion1();
                frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuInventario")
            {
                frmInventario frm = new frmInventario();
                // frm.MdiParent = this;
                frm.Show();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuModificarInventario")
            {
                frmModificarInventario frm = new frmModificarInventario();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuConsultaFactElecClave")
            {
                frmConsultaFacturaElectronica frm = new frmConsultaFacturaElectronica();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuValidacionHacienda")
            {
                frmValidacionDocsHacienda frm = new frmValidacionDocsHacienda();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuParametrosSistema")
            {
                frmParametrosEmpresa frm = new frmParametrosEmpresa();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuDocumentosEmitidos")
            {
                frmBuscarDocumentos frm = new frmBuscarDocumentos();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuAcercaDe")
            {
                Acerca frm = new Acerca();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuConsultarFacHac")
            {
                frmConsultaFacturaElectronica frm = new frmConsultaFacturaElectronica();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuReporteHacienda")
            {
                frmMensajesHacienda frm = new frmMensajesHacienda();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuConsultaMensajes")
            {
                frmConsultasMensajesHacienda frm = new frmConsultasMensajesHacienda();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuValidarMensajes")
            {
                frmValidacionDocsHacienda frm = new frmValidacionDocsHacienda();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuAbonos")
            {
                frmAbonoCredito frm = new frmAbonoCredito();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuUsuarios")
            {
                frmUsuario frm = new frmUsuario();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuEmpresa")
            {
                frmEmpresa frm = new frmEmpresa();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuCambiarContrasena")
            {
                frmCambiarContrasena frm = new frmCambiarContrasena();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuParametros")
            {
                frmParametrosEmpresa frm = new frmParametrosEmpresa();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuCompras")
            {
                frmCompras frm = new frmCompras();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuExportarPrecios")
            {
                frmExportListaPreciosJSON frm = new frmExportListaPreciosJSON();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuImportarDatosJson")
            {
                frmImportaListaPreciosJSON frm = new frmImportaListaPreciosJSON();
                // frm.MdiParent = this;
                frm.ShowDialog();
            }
            else if (((ToolStripMenuItem)sender).Name == "mnuCambiarActividad")
            {
                List <tbEmpresaActividades> listaAct = actIns.getListaEmpresaActividad(Global.Usuario.idEmpresa, (int)Global.Usuario.idTipoIdEmpresa);

                if (listaAct.Count == 1)
                {
                    Global.actividadEconomic = listaAct.FirstOrDefault();
                }
                else
                {
                    frmActividadEconomicaCombo act = new frmActividadEconomicaCombo();
                    act.listaAct = listaAct;
                    act.ShowDialog();
                    tlsPrincipal.Text = Global.actividadEconomic.nombreComercial;
                }
            }
        }
Esempio n. 2
0
        //private  DocumentoEntity crearEntityReporte(tbDocumento doc)
        //{
        //    DocumentoEntity factura = new DocumentoEntity();
        //    factura.clave = doc.clave.Trim();
        //    factura.id = doc.id;
        //    factura.consecutivo = doc.consecutivo.Trim();
        //    factura.fecha = doc.fecha;
        //    //factura.tipoPago = doc.tbTipoPago.nombre;
        //    factura.tipoVenta = doc.tbTipoVenta.nombre.Trim();
        //    factura.cedulaEmisor = Global.Usuario.tbEmpresa.id.Trim();
        //    if (Global.Usuario.tbEmpresa.tipoId==2)
        //    {
        //        factura.nombreEmisor = Global.Usuario.tbEmpresa.tbPersona.nombre.Trim();

        //    }
        //    else
        //    {
        //        factura.nombreEmisor = Global.Usuario.tbEmpresa.tbPersona.nombre.Trim() + " " + Global.Usuario.tbEmpresa.tbPersona.apellido1.Trim() + " " + Global.Usuario.tbEmpresa.tbPersona.apellido2.Trim();


        //    }
        //    factura.correoEmisor = Global.Usuario.tbEmpresa.tbPersona.correoElectronico;
        //    factura.idCliente = doc.idCliente;

        //    if (doc.tipoIdCliente==2)
        //    {
        //        factura.nombreCliente = doc.tbClientes.tbPersona.nombre.Trim();

        //    }
        //    else
        //    {
        //        factura.nombreCliente = doc.tbClientes.tbPersona.nombre.Trim() + " " +  doc.tbClientes.tbPersona.apellido1.Trim() + " " +  doc.tbClientes.tbPersona.apellido2.Trim();

        //    }

        //    factura.telefonoCliente = doc.tbClientes.tbPersona.telefono.ToString().Trim();
        //    factura.correoCliente = doc.tbClientes.tbPersona.correoElectronico.Trim()==null?"": doc.tbClientes.tbPersona.correoElectronico.Trim();
        //    factura.observaciones = doc.observaciones==null?"": doc.observaciones.Trim();
        //    List<DetalleDocumentoEntity> lista = new List<DetalleDocumentoEntity>();
        //    foreach (tbDetalleDocumento detalle in doc.tbDetalleDocumento)
        //    {
        //        DetalleDocumentoEntity detalleEntity = new DetalleDocumentoEntity();
        //        detalleEntity.cantidad = detalle.cantidad;
        //        detalleEntity.descuento = detalle.descuento;

        //        detalleEntity.idDoc = detalle.idDoc;
        //        detalleEntity.idTipoDoc = detalle.idTipoDoc;
        //        detalleEntity.montoTotal = detalle.montoTotal;
        //        detalleEntity.montoTotalDesc = detalle.montoTotalDesc;
        //        detalleEntity.montoTotalImp = detalle.montoTotalImp;
        //        detalleEntity.nombre = detalle.tbProducto.nombre.Trim();
        //        detalleEntity.numLinea = detalle.numLinea;
        //        detalleEntity.precio = detalle.precio;
        //        detalleEntity.totalLinea = detalle.totalLinea;
        //        lista.Add(detalleEntity);

        //    }
        //    factura.DetalleDocumento = lista;

        //    return factura;
        //}

        private void btnBuscarFactura_Click(object sender, EventArgs e)
        {
            frmBuscarDocumentos form = new frmBuscarDocumentos();

            form.ShowDialog();
        }
Esempio n. 3
0
        private void btnDocEmitidos_Click(object sender, EventArgs e)
        {
            frmBuscarDocumentos form = new frmBuscarDocumentos();

            form.ShowDialog();
        }