Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryDiscountLevel


            row = rowSorter.convertRowIndexToModel(row);
        }
       
        if(row != -1) {
            try {
                DirectoryDiscountLevel directory = (DirectoryDiscountLevel)
                        DirectoryLocator.getDirectory(DirectoryDiscountLevel.class, false);
                DirectoryDiscountLevelItem item = (DirectoryDiscountLevelItem) directory.getItems().get(row);
               
                if(MessageBox.showConfirmYesNo(MessageBox.C_DEL_DISCOUNT_LEVEL) == MessageBox.ANSWER_YES) {
                    directory.getItems().remove(row);
                    mainTable.setModel(new TableModelDiscountLevels());
                }
            } catch (ClipsException ex) {
                MessageBox.showException(ex);
            }
View Full Code Here


    private void newBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newBtnActionPerformed
        String name = JOptionPane.showInputDialog(this, "Введите название нового уровня дисконта");
        if(name != null) {
            try {
                DirectoryDiscountLevel directory = (DirectoryDiscountLevel) DirectoryLocator.getDirectory(DirectoryDiscountLevel.class, false);
                DiscountLevelDetails details = new DiscountLevelDetails();
                details.money = 0;
                details.title = name;
                directory.getItems().append(new DirectoryDiscountLevelItem(details));
                mainTable.setModel(new TableModelDiscountLevels());
            } catch (ClipsException ex) {
                MessageBox.showException(ex);
            }
        }
View Full Code Here

     * @param discountCard
     * @throws cli_fmw.delegate.exception.ClipsException
     */
    protected void rebuildTable(DirectoryDiscountCardTypeItem discountCard) {
        try {
            DirectoryDiscountLevel directory = DirectoryLocator.getDirectory(DirectoryDiscountLevel.class, false);
            if(directory.getItems().size() == 0) {
                if(MessageBox.showConfirmYesNo(MessageBox.C_SET_DISC_LEVELS_NOW) == MessageBox.ANSWER_YES) {
                    selectedCard = discountCard;
                    discountLevelBtnActionPerformed(null);
                    return;
                }
View Full Code Here

            }
            rows.put(row++, item);
        }
       
        //col data
        DirectoryDiscountLevel discountDirectiry = DirectoryLocator.getDirectory(DirectoryDiscountLevel.class);
        SelectorEditableExceptional<DirectoryDiscountLevelItem> jj = discountDirectiry.getItems();
        int col = COL_SERVICES+1;
        for(int i=0; i<jj.size(); i++) {
            DirectoryItem item = jj.get(i);
            if(item.getID() == 0) {
                continue;
View Full Code Here

        } catch (Exception ex) {
            clearBean();
            throw new ClipsException("Не удалось загрузить дисконты",ex);
        }

        DirectoryDiscountLevel directoryLevels = DirectoryLocator.getDirectory(DirectoryDiscountLevel.class, false);
        DirectoryServiceClass directoryClasses = DirectoryLocator.getDirectory(DirectoryServiceClass.class);
       
        for(int i=0; i<list.size(); i++) {
            DiscountDetails d = list.get(i);
            DirectoryDiscountLevelItem level = directoryLevels.getItemFromID(d.level);
            DirectoryServiceClassItem cls = directoryClasses.getItemFromID(d.cls);
            discount.setValue(level, cls, d.value);
        }
       
        discount.setLoaded();
View Full Code Here

TOP

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

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.