Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryDistrict


    public List<DiscountCardLocal> getDiscountCards() throws ClipsException {
        return discountCards.get();
    }
   
      public DirectoryDistrictItem getDistrict() throws ClipsException {
        DirectoryDistrict districts = DirectoryLocator.getDirectory(DirectoryDistrict.class);
        return districts.getItemFromID(getDetails().districtId);
    }
View Full Code Here


    }

    public DirectoryDistrictItem getDefaultDistrict(Address address) throws ClipsException {
        try {
            DirectoryKladrItem street = address.getStreet();
            DirectoryDistrict dir = DirectoryLocator.getDirectory(DirectoryDistrict.class);
            if (street != null && street.getID() != 0) {
                int id = getBean().getDefaultDistrict(street.getID(), address.getBuilding());
                if (id != 0) {
                    return dir.getItemFromID(id);
                }
            }
            return dir.getNullItem();
        } catch (ClipsServerException ex) {
            clearBean();
            throw new ClipsException("Ну удалось найти терапевтический участок", ex);
        }
    }
View Full Code Here

                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void changeModelDistrict(final DirectoryLpuItem lpu) throws ClipsException {
        DirectoryDistrict dirDistrict = DirectoryLocator.getDirectory(DirectoryDistrict.class);
        ROList<DirectoryDistrictItem> filteredItems = dirDistrict.getFilteredItems(lpu);
        ROList<DirectoryDistrictItem> items = dirDistrict.getFilteredItems(lpu);
        if (!items.contains(clientLocal.getDistrict())) {
            clientLocal.setDistrict(dirDistrict.getNullItem());
        }
        DelegateComboboxModel model = new DelegateComboboxModel<ClientLocal>(cbDistrict, clientLocal, true) {

            @Override
            public Object getElementAtImp(int index) throws ClipsException {
                System.out.println("getElementAtImp");
                DirectoryDistrict dirDistrict = DirectoryLocator.getDirectory(DirectoryDistrict.class);
                return dirDistrict.getFilteredItems(lpu).get(index);
            }

            @Override
            public int getSizeImp() throws ClipsException {
                System.out.println("getSizeImp");
                DirectoryDistrict dirDistrict = DirectoryLocator.getDirectory(DirectoryDistrict.class);
                return dirDistrict.getFilteredItems(lpu).size();
            }

            @Override
            public Object getSelectedItemImp() throws ClipsException {
                System.out.println("getSelectedItemImp");
                DirectoryDistrict dirDistrict = DirectoryLocator.getDirectory(DirectoryDistrict.class);
                ROList<DirectoryDistrictItem> items = dirDistrict.getFilteredItems(lpu);
                return getObject().getDistrict();
            }

            @Override
            public void setSelectedItemImp(Object anItem) throws ClipsException {
View Full Code Here

TOP

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

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.