Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryEnterpriseItem


            DirectoryEnterprise directoryEnterprise = DirectoryLocator.getDirectory(DirectoryEnterprise.class, false);
            DirectoryDialogDefault dlg = new DirectoryDialogDefault(false, null, "\\", directoryEnterprise);
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                Selector items = dlg.getSelectedItems();
                DirectoryEnterpriseItem enterprise = (DirectoryEnterpriseItem) items.get(0);
                tfEnterprise.setText(enterprise.getTitle());
                jPanel12.revalidate();
                filter.enterpriseId = enterprise.getID();
            } else {
                chbEnterprise.setSelected(false);
                btEnterprise.setEnabled(false);
            }
        } catch (ClipsException ex) {
View Full Code Here


* @param evt
*/
private void btEnterpriseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btEnterpriseActionPerformed
    try {
        DirectoryEnterprise directoryEnterprise = DirectoryLocator.getDirectory(DirectoryEnterprise.class, false);
        DirectoryEnterpriseItem selected = null;
        if(filter.enterpriseId > 0) {
            selected = directoryEnterprise.getItemFromID(filter.enterpriseId);
        }
        DirectoryDialogDefault dlg = new DirectoryDialogDefault(false, selected, "\\", directoryEnterprise);
        dlg.setVisible(true);
        if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
            Selector items = dlg.getSelectedItems();
            DirectoryEnterpriseItem ent = (DirectoryEnterpriseItem) items.get(0);
            tfEnterprise.setText(ent.getTitle());
            jPanel12.revalidate();
            filter.enterpriseId = chbEnterprise.isSelected() ? ent.getID() : 0;
        }
    } catch (ClipsException ex) {
        ex.printStackTrace();
    }
}//GEN-LAST:event_btEnterpriseActionPerformed
View Full Code Here

        }
        cbEnd.setSelected(contractLocal.getEnd() != null);
        if (!cbEnd.isSelected()) {
            chooserEnd.setEnabled(false);
        }
        DirectoryEnterpriseItem ent = contractLocal.getEnterprise();

        tfEnterprice.setText(ent.getTitle());

        int i = 0;
        short tp = contractLocal.getType();
        while (i < Contract.TYPES_ARRAY.length && Contract.TYPES_ARRAY[i].num != tp) {
            i++;
View Full Code Here

                    contractLocal.getEnterprise(), "\\", directoryEnterprise);

            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                Selector items = dlg.getSelectedItems();
                DirectoryEnterpriseItem enterprice = (DirectoryEnterpriseItem) items.get(0);
                contractLocal.setEnterprise(enterprice);
                tfEnterprice.setText(enterprice.getTitle());
            }
        } catch (ClipsException ex) {
            ex.printStackTrace();
        }
    }//GEN-LAST:event_btChangeEnterpriceActionPerformed
View Full Code Here

            DirectoryEnterprise directoryEnterprise = DirectoryLocator.getDirectory(DirectoryEnterprise.class, false);
            DirectoryDialogDefault dlg = new DirectoryDialogDefault(false, enterprise, "\\", directoryEnterprise);
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                Selector items = dlg.getSelectedItems();
                DirectoryEnterpriseItem selectedEnterprise = (DirectoryEnterpriseItem) items.get(0);
                this.enterprise = selectedEnterprise;
                labEnterprice.setText(selectedEnterprise.getTitle());
            }
        } catch (ClipsException ex) {
            ex.printStackTrace();
        }
    }//GEN-LAST:event_btChangeEnterpriceActionPerformed
View Full Code Here

                case COL_INDEX: {
                    return contractLocal.getIndex();
                }
                case COL_ENTERPRICE: {
                    //предприятие
                    DirectoryEnterpriseItem enterprise = contractLocal.getEnterprise();
                    if (enterprise != null) {
                        return enterprise;
                    } else {
                        return null;
                    }
View Full Code Here

        directionCombo.removeAllItems();
        List jobs = clientLocal.getJobList();
        for (int i = 0; i < jobs.size(); i++) {
            JobLocal job = (JobLocal) jobs.get(i);
            if (!job.isFired()) {
                DirectoryEnterpriseItem item = job.getEnterprise();
                EnterpriseInfo entInfo = new EnterpriseInfo(item);
                directionCombo.addItem(entInfo);
                count++;
            }
        }
View Full Code Here

    public PanelProfcheckupView(PageContainer container, ContractLocal contractLocal, ProfcheckupLocal profcheckup) throws ClipsException {
        super(container);
        initComponents();
        this.profcheckup = profcheckup;
        //поиск цехового терапевта
        DirectoryEnterpriseItem enterprise = null;
        DirectoryCollaboratorItem collaborator = null;
        enterprise = contractLocal.getEnterprise();
        if (enterprise != null) {
            collaborator = enterprise.getCollaborator();
        }
        while (collaborator == null && enterprise != null){
            collaborator = enterprise.getCollaborator();
            enterprise = enterprise.getParent();
        }       

        panelProfcheckup = new PanelProfcheckup(container, collaborator, contractLocal, profcheckup);
        this.add(panelProfcheckup, BorderLayout.CENTER);
//        this.revalidate();
View Full Code Here

    }

    @Override
    public void chooseDone(int type, int id) throws ChoosePanelComboException {
        try {
            DirectoryEnterpriseItem dei = dirEnterprise.getItemFromID(id);
            DirectoryCollaboratorItem collaborator = dei.getCollaborator();

            DirectoryEnterpriseItem parentEnt = dei.getParent();
            while (collaborator == null && parentEnt != null){//find collab up
                collaborator = parentEnt.getCollaborator();
                parentEnt = parentEnt.getParent();
            }

            if (collaborator == null){
                lblCollab.setText("Не установлен для данного предприятия");
            }else{
View Full Code Here

private void btAddEnterpriseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAddEnterpriseActionPerformed
    try {
        EnterpriseDetails d = new EnterpriseDetails();
        d.id = 0;
        d.title = "Введите название";
        DirectoryEnterpriseItem item = new DirectoryEnterpriseItem(d);
        if (treeEnterprises.getLastSelectedPathComponent() instanceof DirectoryEnterpriseItem) {
            DirectoryEnterpriseItem parent = (DirectoryEnterpriseItem)
                    treeEnterprises.getLastSelectedPathComponent();
            d.parentItem = parent.getID();
            parent.getItems().append(item);
        }
        else {
            d.parentItem = 0;
            enterprises.getItems().append(item);               
        }
View Full Code Here

TOP

Related Classes of clips.delegate.directory.complex.DirectoryEnterpriseItem

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.