Package com.dataman.prometeo.core

Examples of com.dataman.prometeo.core.Compra


             */
            int pregunta = JOptionPane.showConfirmDialog(this, "ESTA SEGURO(A)?",
                    "MENSAJE DEL SISTEMA", JOptionPane.YES_NO_OPTION);

            if (pregunta == 0) {
                Compra compra = new Compra();
                compra.setIdProveedor(pro.getId());
                compra.setEstado("NORMAL")//Normal ó Cancelada
                compra.setFechaRegistro(DateFormat.getDateInstance(DateFormat.DEFAULT).
                        parse(jtxtFecha.getText()));
                compra.insertaSQL();
                //Detalle
                int r = -1;
                for (int k = 0; k < productosModelo.getModel().size() - 1; ++k) {
                    ArrayList<String> w = productosModelo.getModel().get(k);

                    String idProducto = w.get(0);
                    String nombreProducto = w.get(1);
                    int cantidadProducto = Integer.valueOf(w.get(2));
                    String color = w.get(3);
                    String talla = w.get(4);
                    double precioProducto = Double.valueOf(w.get(5));

                    r = compra.insertaProductoSQL(idProducto, nombreProducto,
                            cantidadProducto, precioProducto,
                            color, talla);

                }
                if (r == -1) {
View Full Code Here

TOP

Related Classes of com.dataman.prometeo.core.Compra

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.