Package clips.delegate.service.discount

Examples of clips.delegate.service.discount.DiscountCardLocal


    private PanelDiscountCard panelDiscountCard;

    public DialogNewDiscountCard(PageContainer parent, ClientLocal client, AuditManager am) throws ClipsException {
        super((Frame) parent, "Создание новой дисконтной карты", am);
        initComponents();
        newCard = new DiscountCardLocal(client);
        panelDiscountCard = new PanelDiscountCard(parent, newCard);
        pnlDiscountCard.add(panelDiscountCard, BorderLayout.CENTER);
        pnlDiscountCard.revalidate();

        //диалог посередине, занимает 0,25 от плошади экрана
View Full Code Here


                return false;
            } else {
                return "";
            }
        }
        DiscountCardLocal card = list.get(row - 1);
        try {
            switch (col) {
                case COL_TYPE: return card.getCardType();
                case COL_CODE: return card.getCode();
                case COL_DATE: return Converter.dateToString(card.getExpiredDate());
                case COL_BLOCKED: {
                    boolean expired = card.isExpired();
                    System.out.println(expired);
                    return expired;
                }
                default: throw new UnsupportedOperationException("Not supported yet.");
            }
View Full Code Here

    }

    @Override
    public Object getValueAt(int rowIndex, int col) {
        try {
            DiscountCardLocal card = cards.get(rowIndex);
            switch (col) {
                case COL_TYPE: return card.getCardType();
                case COL_CREATE_DATE: return Converter.dateToString(card.getCreatedDate());
                case COL_COLLAB: return card.getCollaborator();
                case COL_MONEY: return card.getMoney();
                case COL_EXPIRE_DATE: return Converter.dateToString(card.getExpiredDate());
                case COL_BLOCKED: return card.getBlocker() != null;
                default: return "error in switch-case";
            }
        } catch (ClipsException ex) {
            return new ErrorValue(ex);
        }
View Full Code Here

        @Override
        protected List<DiscountCardLocal> init() throws Exception {
            List<DiscountCardDetails> cards = getBean().getDiscountCards();
            List<DiscountCardLocal> tempList = new ArrayList<DiscountCardLocal>();
            for (int i = 0; i < cards.size(); i++) {
                DiscountCardLocal card = new DiscountCardLocal(cards.get(i), getAuditListener());
                tempList.add(card);
            }
            return tempList;
        }
View Full Code Here

        }
        @Override
        protected DiscountCardLocal init() throws Exception {
            DiscountCardDetails details = getBean().getDiscountCard();
            if (details != null) {
                return new DiscountCardLocal(details, getAuditListener());
            }
            return null;
        }
View Full Code Here

TOP

Related Classes of clips.delegate.service.discount.DiscountCardLocal

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.