Package clips.delegate.kek

Examples of clips.delegate.kek.InabilityData


            CommitteeResolutionData comRes = committee.getResolutionList(false).get(row);
           
            if(comRes.getId() == 0) {
                throw new ClipsException("Перед данным действием необходимо сохранить список решений КЭК");
            }
            InabilityData inability = committee.getInabilityByResolution(comRes);
            if (inability != null) {
                jTabbedPane1.setSelectedComponent(panelInability);
                for (int i = 0; i < inabilityList.size(); i++) {
                    if (inabilityList.get(i).equals(inability)) {
                        tabInabilidityList.setRowSelectionInterval(i, i);
                        break;
                    }
                }
            } else {
                if (comRes.isRendered()) {
                    return;
                }
                inability = new InabilityData(comRes);
                DlgInabilityEdit dlg = new DlgInabilityEdit(MainWindow.mainWindow, inability, getAuditManager());
                dlg.setVisible(true);
                if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                    comRes.setRendered(true);
                    committee.getInabilityList(false).append(inability);
View Full Code Here


private void btInabilityViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btInabilityViewActionPerformed
    try {
        int row = tabInabilidityList.getSelectedRowSorted();
        if (row > -1) {
            InabilityData inabilityData = inabilityList.get(row);
            InabilityData inability = (InabilityData) inabilityData.clone();
            DlgInabilityEdit dlg = new DlgInabilityEdit(MainWindow.mainWindow, inability, getAuditManager());
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                inabilityData.setDate(inability.getDate());
                inabilityData.setDateAnswer(inability.getDateAnswer());
                inabilityData.setDesc(inability.getDesc());
                inabilityData.setLevelIn(inability.getLevelIn());
                inabilityData.setLevelOut(inability.getLevelOut());
            }
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
View Full Code Here

private void btInabilityDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btInabilityDelActionPerformed
    try {
        int row = tabInabilidityList.getSelectedRowSorted();
        if (row > -1) {
            InabilityData inabilityData = inabilityList.get(row);
            CommitteeResolutionData comRes = null;
            int id = committee.getInabilityList(false).get(row).getKey();
            for (int i = 0; i < comResList.size(); i++) {
                if (comResList.get(i).getId() == id) {
                    comRes = comResList.get(i);
View Full Code Here

    }
   
    @Override
    public Object getValueAt(int row, int col) {
        try {
            InabilityData inability = inabilityList.get(row);
            switch (col) {
                case COL_ID: {
                    return inability.getId();
                }
                case COL_DATE_IN: {
                    return Converter.dateToString(inability.getDate());
                }
                case COL_LEVEL_IN: {
                    return (inability.getLevelIn() == 0 ? "" : inability.getLevelIn());
                }
                case COL_DATE_OUT: {
                    return Converter.dateToString(inability.getDateAnswer());
                }
                case COL_LEVEL_OUT: {
                    return (inability.getLevelOut() == 0 ? "" : inability.getLevelOut());
                }
                case COL_DESC: {
                    return inability.getDesc();
                }
                case COL_RES_ID: {
                    CommitteeResolutionData data = null;
                    Selector<CommitteeResolutionData> list = committee.getResolutionList(false);
                    for (int i = 0; i < list.size(); i++) {
                        data = list.get(i);
                        if (committee.getInabilityByResolution(data) != null
                                && data.getId() == inability.getKey()) {
                            break;
                        }
                    }
                    return data != null ? data.getId() : "";
                }
View Full Code Here

    }

    @Override
    public Object getValueAt(int row, int col) {
        try {
            InabilityData invalidity = ii.get(row);
            //invalidity.load();
            switch (col) {
                case COL_DATE: {
                    return invalidity.getDate();
                }
                case COL_LEVELIN: {
                    if (invalidity.getLevelIn() != 0) {
                        return invalidity.getLevelIn();
                    } else {
                        return "";
                    }
                }
                case COL_DATEANSWER: {
                    Date date = invalidity.getDateAnswer();
                    if (date != null) {
                        return (new SimpleDateFormat("dd.MM.yyyy")).format(date);
                    } else {
                        return "";
                    }
                }
                case COL_LEVELOUT: {
                    Date date = invalidity.getDateAnswer();
                    if (date != null) {
                        return invalidity.getLevelOut();
                    } else {
                        return "";
                    }
                }
            }
View Full Code Here

TOP

Related Classes of clips.delegate.kek.InabilityData

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.