Example #1
0
        private void Inicilize()
        {
            conceptoMovInvController = new ConceptoMovInvController();
            devolucionpController    = new DevolucionpController();
            devolucionController     = new DevolucionController();
            proveedorController      = new ProveedorController();
            productoController       = new ProductoController();
            movInvController         = new MovInvController();
            loteController           = new LoteController();


            conceptoMovInv = null;
            devolucion     = null;
            partida        = null;
            proveedor      = null;
            producto       = null;
            lote           = null;

            //Listas
            partidas = new List <Devolucionp>();

            //Variables
            sobreGrid = false;
            Subtotal  = 0;
            Impuesto  = 0;
            CreaDevolucion();
        }
        private void Inicializa()
        {
            empresaController   = new EmpresaController();
            traspasoController  = new TraspasoController();
            loteController      = new LoteController();
            traspasoController  = new TraspasoController();
            traspasopController = new TraspasopController();
            productoController  = new ProductoController();
            movInvController    = new MovInvController();
            traspaso            = null;
            partidas            = new List <Traspasop>();
            empresa             = empresaController.SelectTopOne();
            Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PH.XLSX");
            Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PD.XLSX");
            //Ambiente.VaciarDirectorio(empresa.DirectorioTraspasos);

            TxtOrigen.Text     = "";
            TxtDestino.Text    = "";
            TxtDocumento.Text  = "";
            TxtFechaDoc.Text   = "";
            TxtEnviadoPor.Text = "";
            TxtSubtotal.Text   = "";
            TxtImpuesto.Text   = "";
            TxtTotal.Text      = "";
            Malla.Rows.Clear();
            CargaTraspasosPendientes();
        }
        private void ResetPDT()
        {
            productoController  = new ProductoController();
            sucursalController  = new SucursalController();
            loteController      = new LoteController();
            traspasoController  = new TraspasoController();
            traspasopController = new TraspasopController();
            movInvController    = new MovInvController();
            empresaController   = new EmpresaController();
            //listas
            partidas = new List <Traspasop>();

            // Objetos
            traspaso  = null;
            empresa   = empresaController.SelectTopOne();
            producto  = null;
            sucursalO = null;
            lote      = null;

            //Variables
            Subtotal   = 0;
            Impuesto   = 0;
            sobreGrid  = false;
            SigPartida = 0;

            TxtOrigen.Text      = "";
            TxtDestino.Text     = "";
            TxtDocumento.Text   = "";
            TxtProductoId.Text  = "";
            NCantidad.Value     = 1;
            TxtImpuestos.Text   = "";
            TxtSubtotal.Text    = "";
            TxtTotal.Text       = "";
            TxtDescripcion.Text = "";
            TxtLoteId.Text      = "";
            TxtNoLote.Text      = "";
            TxtCaducidad.Text   = "";

            Malla.Rows.Clear();
            MallaLote.Rows.Clear();
            for (int i = 0; i < NPARTIDAS; i++)
            {
                Malla.Rows.Add();
                Malla.Rows[i].Cells[3].Style.BackColor = Color.Yellow;
                Malla.Rows[i].Cells[4].Style.BackColor = Color.Yellow;
                Malla.Rows[i].Cells[6].Style.BackColor = Color.Yellow;
                Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow;
            }

            CreaTraspaso();
        }
        private void ResetPDV()
        {
            venta            = new Venta();
            partidas         = new List <Ventap>();
            cliente          = null;
            producto         = null;
            SigPartida       = 0;
            datosCliente     = "PUBLICO EN GENERAL";
            TxtSubtotal.Text = "";
            TxtTotal.Text    = "";
            TxtCliente.Text  = "";

            ventaController    = new VentaController();
            ventapController   = new VentapController();
            productoController = new ProductoController();
            clienteController  = new ClienteController();

            ImpuestoController   = new ImpuestoController();
            empresaController    = new EmpresaController();
            loteController       = new LoteController();
            movInvController     = new MovInvController();
            flujoController      = new FlujoController();
            reporteController    = new ReporteController();
            dymErrorController   = new DymErrorController();
            formaPagoController  = new FormaPagoController();
            loteVentapController = new LoteVentapController();
            oCFDI = new CFDI();
            lote  = null;
            TxtProductoId.Focus();


            //Reset malla
            Malla.Rows.Clear();
            for (int i = 0; i < NPARTIDAS; i++)
            {
                Malla.Rows.Add();
                Malla.Rows[i].Cells[2].Style.BackColor = Color.Yellow;
                Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow;
            }
            CreaVenta();
        }
        private void Incializa()
        {
            tipoInventarioController = new TipoInventarioController();
            productoController       = new ProductoController();
            inventarioController     = new InventarioController();
            inventariopController    = new InventariopController();
            loteController           = new LoteController();
            movInvController         = new MovInvController();


            tipoInventario = null;
            producto       = null;
            lote           = null;
            inventario     = null;
            categoria      = null;
            partida        = null;
            Costo          = 0;
            partidas       = new List <Inventariop>();;
            CreaInventario();
            TxtTipoInv.Focus();
        }
Example #6
0
        private void Initialize()
        {
            //Controllers
            productoSustanciaController = new ProductoSustanciaController();
            cierreInventariopController = new CierreInventariopController();
            productoImpuestoController  = new ProductoImpuestoController();
            cierreInventarioController  = new CierreInventarioController();
            migrationTableController    = new MigrationTableController();
            migrationFieldController    = new MigrationFieldController();
            presentacionController      = new PresentacionController();
            laboratorioController       = new LaboratorioController();
            categoriaController         = new CategoriaController();
            sustanciaController         = new SustanciaController();
            productoController          = new ProductoController();
            loteController   = new LoteController();
            movInvController = new MovInvController();
            //Objetos
            productoSustancia = null;
            productoImpuesto  = null;
            cierreInventario  = null;
            cierreInventariop = null;
            migrationTable    = null;
            migrationField    = null;
            presentacion      = null;
            laboratorio       = null;
            categoria         = null;
            sustancia         = null;
            producto          = null;
            lote = null;

            //Listas
            productoSustancias = new List <ProductoSustancia>();
            productoImpuestos  = new List <ProductoImpuesto>();
            migrationTables    = new List <MigrationTable>();
            migrationFields    = new List <MigrationField>();
            presentaciones     = new List <Presentacion>();
            laboratorios       = new List <Laboratorio>();
            categorias         = new List <Categoria>();
            sustancias         = new List <Sustancia>();
            productos          = new List <Producto>();
            lotes = new List <Lote>();


            try
            {
                //Conexion vfpro
                Sql              = "";
                dataTable        = new DataTable();
                connectionstring = "Provider=VFPOLEDB.1;Data Source=" + Ambiente.Empresa.MicroPvdb + ";";
                oleDbConnection  = new OleDbConnection(connectionstring);
                oleDbConnection.Open();


                //Llena combo tablas
                migrationTables        = migrationTableController.SelectAll();
                CboTabla.DataSource    = migrationTables;
                CboTabla.DisplayMember = "Tabla";
                CboTabla.ValueMember   = "MigrationTableId";
                CboTabla.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void ResetPDC()
        {
            //objetos
            compra       = new Compra();
            comprap      = new Comprap();
            producto     = new Producto();
            proveedor    = new Proveedor();
            cambioPrecio = new CambiosPrecio();
            empresa      = new EmpresaController().SelectTopOne();

            //listas
            partidas              = new List <Comprap>();
            impuestos             = new List <Impuesto>();
            lotes                 = new List <Lote>();
            productosActualizados = new List <Producto>();

            //Controladores
            compraController       = new CompraController();
            comprapController      = new ComprapController();
            loteController         = new LoteController();
            movInvController       = new MovInvController();
            flujoController        = new FlujoController();
            productoController     = new ProductoController();
            laboratorioController  = new LaboratorioController();
            cambioPrecioController = new CambioPrecioController();

            //Variables
            SigPartida = 0;
            subtotal   = 0;
            impuesto   = 0;
            sobreGrid  = false;

            //Reset malla
            Malla.Rows.Clear();
            GridImpuestos.Rows.Clear();
            for (int i = 0; i < NPARTIDAS; i++)
            {
                Malla.Rows.Add();
                Malla.Rows[i].Cells[4].Style.BackColor  = Color.Yellow;
                Malla.Rows[i].Cells[6].Style.BackColor  = Color.Yellow;
                Malla.Rows[i].Cells[8].Style.BackColor  = Color.Yellow;
                Malla.Rows[i].Cells[9].Style.BackColor  = Color.Yellow;
                Malla.Rows[i].Cells[14].Style.BackColor = Color.Yellow;
                Malla.Rows[i].Cells[15].Style.BackColor = Color.Yellow;
            }

            TxtProvedorId.Text       = "";
            TxtFacturaProveedor.Text = "";
            DpFechaDoc.Value         = DateTime.Now;
            DpFechaVencimiento.Value = DateTime.Now;
            TxtDatosProveedor.Text   = "";
            TxtProductoId.Text       = "";
            NCantidad.Value          = 1;
            TxtPrecioCompra.Text     = "";
            TxtPrecioCaja.Text       = "";
            NDesc.Value         = 0;
            TxtDescripcion.Text = "";
            TxtU1.Text          = "";
            TxtU2.Text          = "";
            TxtU3.Text          = "";
            TxtU4.Text          = "";
            TxtPrecio1.Text     = "";
            TxtPrecio2.Text     = "";
            TxtPrecio3.Text     = "";
            TxtPrecio4.Text     = "";
            TxtPrecioS1.Text    = "";
            TxtPrecioS2.Text    = "";
            TxtPrecioS3.Text    = "";
            TxtPrecioS4.Text    = "";
            PbxImagen.Image     = null;
            TxtSubtotal.Text    = "";
            TxtImpuestos.Text   = "";
            TxtTotal.Text       = "";
            CreaCompra();
        }