Package clips.delegate.directory.ro

Examples of clips.delegate.directory.ro.DirectoryCollaboratorItem


        panelSelColl.setOnlyShedule(true);
        panelSelColl.addContentStateListener(new ContentStateListener() {

            @Override
            public void contentStateChanged() {
                DirectoryCollaboratorItem item = panelSelColl.getSelectedItem();
                int id = item == null ? 0 : item.getID();
                try {
                    chooseDone(0, id);
                } catch (ChoosePanelComboException ex) {
                    try {
                        int collID = sil.getCollaborator().getID();
View Full Code Here


            if (sil == null && id == 0) {
                return;
            }

            DirectoryCollaborator colls = DirectoryLocator.getDirectory(DirectoryCollaborator.class, false);
            DirectoryCollaboratorItem collaborator = colls.getItemFromID(id);
           
            if(sil == null || sil.getCollaborator() != collaborator) {

                if(sil != null && sil.isDirty()) {
                    int ans = MessageBox.showConfirmYesNoCancel(MessageBox.C_SAVE_CHANGES);
View Full Code Here

        } else if (sil == null && id == 0) {
            return;
        }

        try {
            DirectoryCollaboratorItem coll =
                    DirectoryLocator.getDirectory(DirectoryCollaborator.class, false).getItemFromID(id);
            //try save current modification
            if (sil != null && sil.isDirty()) {
                int ans = MessageBox.showConfirmYesNoCancel(MessageBox.C_SAVE_CHANGES);
                if (ans == MessageBox.ANSWER_NO) {
View Full Code Here

        collabModel = new VetoableComboBoxModel();
        DirectoryCollaborator colls = DirectoryLocator.getDirectory(DirectoryCollaborator.class, false);
        DirectoryLpuItem lpu = UserInfo.get().getCollaborator().getLpu();
        List<DirectoryCollaboratorItem> c = colls.getItemsFiltered(lpu, false, true, true);
        for (int i = 0; i < c.size(); i++) {
            DirectoryCollaboratorItem coll = c.get(i);
            if(coll.isVisible()
                    && coll.isSheduled()) {
                collabModel.addElement(c.get(i));
            }
        }
        collabModel.setSelectedItem(selected);
        collabModel.addVetoableComboBoxListener(collaboratorProcess);
View Full Code Here

            throws ClipsException {
        collabModel = new VetoableComboBoxModel();
        Iterator<DirectoryCollaboratorItem> i= sip.getInsertionPoint(workType).iterator();
        DirectoryLpuItem lpu = UserInfo.get().getCollaborator().getLpu();
        while(i.hasNext()) {
            DirectoryCollaboratorItem item = i.next();

            if(item.isVisible() && item.getLpu().getID() == lpu.getID()
                    && item.isSheduled()) {
                collabModel.addElement(item);
            }
        }
       
        collabModel.setSelectedItem(null);
View Full Code Here

    @Override
    public void restore() {
        if(srl != null) {
            try {
                srl.restore();
                DirectoryCollaboratorItem coll = (DirectoryCollaboratorItem) collabModel.getSelectedItem();
                if(coll != null) {
                    initPanel(coll);
                    setPanelMode(PANELMODE_OK, null);
                } else {
                    setPanelMode(PANELMODE_NOSELECTION, null);
View Full Code Here

        try {
            DirectoryDialogCollaborators dlg = new DirectoryDialogCollaborators(false, true, false, null);
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
               Selector coll = dlg.getSelectedItems();
               DirectoryCollaboratorItem collaborator = (DirectoryCollaboratorItem) coll.get(0);
               boolean isIn = false;
               for (int i = 0; i < memberList.size(); i++) {
                   if (collaborator.getID() == memberList.get(i).getCollaborator().getID()) {
                       isIn = true;
                       break;
                   }
               }
               if (!isIn) {
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{
                lblCollab.setText(collaborator.getTitle());
                current = collaborator;
            }
            lblNotCorrect.setVisible(collaborator != null && collaborator != UserInfo.get().getCollaborator());

            Set<ContractLocal> usableContracts = searchLocal.search(dei).getUsableContracts();
View Full Code Here

    /**
     * Заполняет комбо с сотрудниками
     * @throws cli_fmw.delegate.exception.ClipsException
     */
    private void initCollaboratorPage() throws ClipsException {
        DirectoryCollaboratorItem coll = UserInfo.get().getCollaborator();
        currentCollaborator.setText(coll.getTitle());
    spCollaboratorSellect.setSelectedCollaborator(coll);
    }
View Full Code Here

        } else {
            txt += undefined + "</p>";
            ok = false;
        }
        if (collaboratorClinicRadio.isSelected()) {
      DirectoryCollaboratorItem    coolab = spCollaboratorSellect.getSelectedItem();
      if (coolab == null){
        txt += "<p><u>Выдавший врач: </u>" + undefined + "</p>";
                ok = false;
      }
      else{
        txt += "<p><u>Выдан клинкой: </u>";
        try {
          txt += coolab.getLpu();
        } catch (ClipsException ex) {
          MessageBox.showException(ex);
        }
        txt += "<p><u>Выдавший врач: </u>" + coolab  + "</p>";
      }
View Full Code Here

TOP

Related Classes of clips.delegate.directory.ro.DirectoryCollaboratorItem

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.