Package beans.contract

Examples of beans.contract.VisitPrice


            for (int c = 0; c < recordCount; c++) {
                try {
                    dbfVisit.read();
                    String id = fieldsVisit.get(ColVisit.ID).get().trim();
                    String price = fieldsVisit.get(ColVisit.PRICE).get().trim();
                    visitPriceSet.add(new VisitPrice(id, price));
                    System.out.println(id + " " + price);
                } catch (IOException ex) {
                    closeDBF(dbfVisit);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfVisit.getName(), ex);
                } catch (xBaseJException ex) {
                    closeDBF(dbfVisit);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfVisit.getName(), ex);
                }
            }
            closeDBF(dbfVisit);
        }

        {
            File file = new File(cfg.getLastDBFImportPath(), S_UET);
            DBF dbfUET = createDBF(file);
            HashMap<ColUet, Field> fieldsUet = new HashMap<ColUet, Field>();
            try {
                for (int i = 0; i < ColVisit.values().length; i++) {
                    ColUet col = ColUet.values()[i];
                    fieldsUet.put(col, dbfUET.getField(col.toString()));
                }
            } catch (xBaseJException ex) {
                throw new ClipsException("Ошибка при чтении данных из файла " + dbfUET.getName(), ex);
            }

            int recordCount = dbfUET.getRecordCount();
            for (int c = 0; c < recordCount; c++) {
                try {
                    dbfUET.read();
                    String id = fieldsUet.get(ColUet.LEVELMES).get().trim();
                    String price = fieldsUet.get(ColUet.PRICE).get().trim();
                    VisitPrice vp = new VisitPrice(id + "29000", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                    vp = new VisitPrice(id + "29824", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                    vp = new VisitPrice(id + "29825", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                } catch (IOException ex) {
                    closeDBF(dbfUET);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfUET.getName(), ex);
                } catch (xBaseJException ex) {
                    closeDBF(dbfUET);
View Full Code Here

TOP

Related Classes of beans.contract.VisitPrice

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.