Package net.caece.fmII.hibernate

Examples of net.caece.fmII.hibernate.Equipment


            item.setParent(supplierIdCB);
        }
    }

    public void add() {
        Equipment obj = (Equipment) viewToObj(null);
        EquipmentDao dao = new EquipmentDao();
        add(dao, obj);
    }
View Full Code Here


    public void refreshObjEntities() {
        refreshObjEntities("Equipment.getAll", objListRenderer);
    }

    public Object viewToObj(Object var) {
        Equipment obj = new Equipment();
        if (var != null) {
            try {
                BeanUtils.copyProperties(obj, var);
            } catch (Exception iae) {
                iae.printStackTrace();
            }
        }

        Radiogroup isEquipment = (Radiogroup) getFellow("isEquipment");
        Textbox equipmentNameTB = (Textbox) getFellow("equipmentName");
        Combobox supplierIdCB = (Combobox) getFellow("supplierId");
        Textbox pccCodeTB = (Textbox) getFellow("pccCode");
        Textbox venderCodeTB = (Textbox) getFellow("venderCode");

        obj.setIsEquipment(isEquipment.getSelectedItem().getValue());
        obj.setEquipmentName(equipmentNameTB.getText());
        obj.setSupplier((Supplier) supplierIdCB.getSelectedItem().getValue());
        obj.setPccCode(pccCodeTB.getText());
        obj.setVenderCode(venderCodeTB.getText());

        Textbox insideCodeTB = (Textbox) getFellow("insideCode");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Doublebox latestPriceTB = (Doublebox) getFellow("latestPrice");
        Intbox inventoryAmountTB = (Intbox) getFellow("inventoryAmount");
        Combobox systemTypeCB = (Combobox) getFellow("system");
        obj.setInsideCode(insideCodeTB.getText());
        obj.setPriority(priorityCB.getSelectedItem().getValue().toString());
        obj.setLatestPrice(latestPriceTB.getValue());
        obj.setInventoryAmount(inventoryAmountTB.getValue());
        obj.setSystemType(systemTypeCB.getSelectedItem().getValue().toString());

        return obj;
    }
View Full Code Here

        initEquipmentBySystem();

        Iterator equipmentCBItr = equipmentCB.getItems().iterator();
        while (equipmentCBItr.hasNext()) {
            Comboitem item = (Comboitem) equipmentCBItr.next();
            Equipment equ = (Equipment) item.getValue();
            if (equ.getEquipmentId().equals(form.getEquipmentId())) {
                equipmentCB.setSelectedItem(item);
            }
        }

        Textbox supplierNameTB = (Textbox) getFellow("supplierName");
View Full Code Here

        Textbox descriptionTB = (Textbox) getFellow("description");

        Building building = (Building) buildingListbox.getSelectedItem().getValue();
        var.setBuilding(building);

        Equipment equ = (Equipment) equipmentCB.getSelectedItem().getValue();
        var.setEquipment(equ);

        var.setFloor(floorTB.getText());
        var.setRegion(regionTB.getText());
        var.setPriority(priorityCB.getSelectedItem().getValue().toString());
View Full Code Here

TOP

Related Classes of net.caece.fmII.hibernate.Equipment

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.