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 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();
        }