Examples of EquipmentForm


Examples of net.caece.fmII.hibernate.vo.EquipmentForm

            equipmentCB.removeItemAt(0);
        }
        // re-set equipment combobox
        Iterator it = equipmentList.iterator();
        while (it.hasNext()) {
            EquipmentForm ef = (EquipmentForm) it.next();
            Comboitem item = new Comboitem();
            item.setValue(ef);
            item.setLabel(ef.getEquipmentId() + " - " + ef.getEquipmentName());
            item.setParent(equipmentCB);
        }
    }
View Full Code Here

Examples of net.caece.fmII.hibernate.vo.EquipmentForm

        }
    }

    public void setSupplierInfo() {
        Combobox equipmentCB = (Combobox) getFellow("equipment");
        EquipmentForm ef = (EquipmentForm) equipmentCB.getSelectedItem().getValue();

        // show supplier name
        Textbox supplierNameTB = (Textbox) getFellow("supplierName");
        supplierNameTB.setText(ef.getSupplierName());

        // show priority
        Combobox priorityCB = (Combobox) getFellow("priority");
        for (int i = 0; i < priorityCB.getItemCount(); i++) {
            String priority = priorityCB.getItemAtIndex(i).getValue().toString();
            if (priority.equals(ef.getPriority())) {
                priorityCB.setSelectedIndex(i);
                break;
            }
        }

        Textbox propertyCodeTB = (Textbox) getFellow("propertyCode");
        propertyCodeTB.setText(ef.getInsideCode());


        // reset queryCount , when you use it as the query condition
        queryCount = 0;
        queryMatched = null;
View Full Code Here

Examples of net.caece.fmII.hibernate.vo.EquipmentForm

    private List queryMatched = null;

    public void query() {

        Combobox equipmentCB = (Combobox) getFellow("equipment");
        EquipmentForm ef = (EquipmentForm) equipmentCB.getSelectedItem().getValue();

        Tree objTree = (Tree) getFellow("objTree");

        Collection items = objTree.getItems();

        if (queryMatched == null) {
            queryMatched = new ArrayList();
            Iterator it = items.iterator();
            while (it.hasNext()) {
                Treeitem item = (Treeitem) it.next();
                SimpleTreeNode node = (SimpleTreeNode) item.getValue();
                BomForm var = (BomForm) node.getData();
                if (var.getEquipmentName().equals(ef.getEquipmentName())) {
                    queryMatched.add(item);
                }
            }
        }
        if (queryMatched.size() == 0) {
View Full Code Here

Examples of net.caece.fmII.hibernate.vo.EquipmentForm

    public boolean validate() {
        return true;
    }

    public void update() {
        EquipmentForm obj = (EquipmentForm) objListbox.getSelectedItem().getValue();
        EquipmentDao dao = new EquipmentDao();
        update(dao, obj);

    }
View Full Code Here

Examples of net.caece.fmII.hibernate.vo.EquipmentForm

        update(dao, obj);

    }

    public void delete() {
        EquipmentForm obj = (EquipmentForm) objListbox.getSelectedItem().getValue();
        EquipmentDao dao = new EquipmentDao();
        delete(dao, obj);

        // empty all fields
        EquipmentForm emptyObj = new EquipmentForm();
        objToView(emptyObj);
    }
View Full Code Here

Examples of net.caece.fmII.hibernate.vo.EquipmentForm

        return obj;
    }

    public void objToView(Object obj) {
        EquipmentForm var = (EquipmentForm) obj;

        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");

        Iterator it = isEquipment.getItems().iterator();
        while (it.hasNext()) {
            Radio radio = (Radio) it.next();
            if (radio.getValue().equals(var.getIsEquipment())) {
                radio.setChecked(true);
            }
        }

        equipmentNameTB.setText(var.getEquipmentName());

        Iterator supplierIt = supplierIdCB.getItems().iterator();
        while (supplierIt.hasNext()) {
            Comboitem item = (Comboitem) supplierIt.next();
            Supplier s = (Supplier) item.getValue();
            if (var.getSupplierId() != null && var.getSupplierId() == s.getSupplierId()) {
                supplierIdCB.setSelectedItem(item);
            }
        }

        pccCodeTB.setText(var.getPccCode());
        venderCodeTB.setText(var.getVenderCode());

        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");

        insideCodeTB.setText(var.getInsideCode());
        Iterator priorityIt = priorityCB.getItems().iterator();
        while (priorityIt.hasNext()) {
            Comboitem item = (Comboitem) priorityIt.next();

            String priorityStr = item.getValue().toString();
            if (var.getPriority() != null && var.getPriority().equals(priorityStr)) {
                priorityCB.setSelectedItem(item);
            }
        }
        latestPriceTB.setValue(var.getLatestPrice());
        inventoryAmountTB.setValue(var.getInventoryAmount());

        Iterator stItr = systemTypeCB.getItems().iterator();
        while (stItr.hasNext()) {
            Comboitem item = (Comboitem) stItr.next();
            String s = (String) item.getValue();
            if (s.equals(var.getSystemType())) {
                systemTypeCB.setSelectedItem(item);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.