Package clips.delegate.contract

Examples of clips.delegate.contract.ContractLocal$ServiceSpecialityList


        updateTable();
    }//GEN-LAST:event_btFindActionPerformed
   
    private void btNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btNewActionPerformed
        try {
            PanelContractInfo panel = new PanelContractInfo(getContainer(), new ContractLocal(getAuditManager()));
            PageGeneric page = getContainer().addNewPage(panel, this);
            getContainer().activatePage(page);
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
View Full Code Here


    }//GEN-LAST:event_tfIndexFocusGained

    private void btCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCopyActionPerformed
      if (tabContractList.getSelectedRowCount() > 0) {
          try {
              ContractLocal cl = contractList.get(tabContractList.getSelectedRowSorted());
              cl = cl.copy();
              PanelContractInfo panel = new PanelContractInfo(getContainer(), cl);
              PageGeneric page = getContainer().addNewPage(panel, this);
              getContainer().activatePage(page);
          } catch (ClipsException ex) {
              MessageBox.showException(ex);
View Full Code Here

    }//GEN-LAST:event_btCopyActionPerformed

    private void btDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btDeleteActionPerformed
      if (tabContractList.getSelectedRowCount() > 0) {
          try {
              ContractLocal cl = contractList.get(tabContractList.getSelectedRowSorted());
              cl.remove();
              btFind.doClick();
          } catch (ClipsException ex) {
              MessageBox.showException(ex);
          }
      } else {
View Full Code Here

        contractList = clientLoc.getPolisList();
       
        if (contractList != null) {
            ArrayList<ContractLocal> contracts = new ArrayList<ContractLocal>();
            for(int i = 0; i < contractList.size(); i++) {
                ContractLocal contract = contractList.get(i).getContract();
                if (contract.getLpu() == null
                        || contract.getLpu().getID() == UserInfo.get().getCollaborator().getLpu().getID()) {
                    contracts.add(contract);
                }
            }
       
            tableContractList.setModel(new TableModelContractList(contracts));
View Full Code Here

    }

    @Override
    public Object getValueAt(int r, int c) {
        try {
            ContractLocal contractLocal = contractList.get(r);

            switch (c) {
                case COL_INDEX: {
                    return contractLocal.getIndex();
                }
                case COL_ENTERPRICE: {
                    //предприятие
                    DirectoryEnterpriseItem enterprise = contractLocal.getEnterprise();
                    if (enterprise != null) {
                        return enterprise;
                    } else {
                        return null;
                    }
                }
                case COL_TYPE: {
                    //Тип договора
                    int i = contractLocal.getType();
                    return Contract.TYPES_ARRAY[i].toString();
                }
                case COL_BEGIN: {
                    //дата начала
                    return contractLocal.getBegin();
                }
                case COL_END: {
                    //дата окончания
                    return contractLocal.getEnd();
                }
                case COL_LPU: {
                    DirectoryLpuItem lpu = contractLocal.getLpu();
                    if (lpu == null || lpu.isNullItem()) {
                        return "все";
                    } else {
                        return lpu.getTitleShort();
                    }
View Full Code Here

  protected void modifyErrorTableCellRendererComponent(JTable table, Object value, int row, int col) throws ClipsException {
    TableModel          model = table.getModel();
    if (!(model instanceof TableModelContractList)){
      return;
    }
    ContractLocal        contract = ((TableModelContractList)model).getRowValue(row);
    if (contract.isOpen()){
      render().setForeground(table.getForeground());
    }
    else{
      render().setForeground(Color.GRAY);
    }
View Full Code Here

    @Override
    public void updateImpl() throws ClipsException {
        ContractFactoryLocal cfl = new ContractFactoryLocal(am);
        List<ContractLocal> contractList = cfl.findContractsOMIForUpdate();
        ContractLocal contract;
        if (contractList.size() == 0) {
            throw new ClipsException("Не найден текущий контракт ОМС");
        } else {
            //Найдено несколько контрактов
            DialogSelectContract dlg = new DialogSelectContract(MainWindow.mainWindow, contractList, am);
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                contract = dlg.getSelectedContract();
            } else {
                return;
            }
        }

        HashSet<VisitPrice> visitPriceSet = new HashSet<VisitPrice>();

        ClipsConfig cfg = ClipsConfig.getInstance();
        {
            File file = new File(cfg.getLastDBFImportPath(), S_VISIT);
            DBF dbfVisit = createDBF(file);
            HashMap<ColVisit, Field> fieldsVisit = new HashMap<ColVisit, Field>();
            try {
                for (int i = 0; i < ColVisit.values().length; i++) {
                    ColVisit col = ColVisit.values()[i];
                    fieldsVisit.put(col, dbfVisit.getField(col.toString()));
                }
            } catch (xBaseJException ex) {
                throw new ClipsException("Ошибка при чтении данных из файла " + dbfVisit.getName(), ex);
            }

            int recordCount = dbfVisit.getRecordCount();
            for (int c = 0; c < recordCount; c++) {
                try {
                    dbfVisit.read();
                    String id = fieldsVisit.get(ColVisit.ID).get().trim();
                    String price = fieldsVisit.get(ColVisit.PRICE).get().trim();
                    visitPriceSet.add(new VisitPrice(id, price));
                    System.out.println(id + " " + price);
                } catch (IOException ex) {
                    closeDBF(dbfVisit);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfVisit.getName(), ex);
                } catch (xBaseJException ex) {
                    closeDBF(dbfVisit);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfVisit.getName(), ex);
                }
            }
            closeDBF(dbfVisit);
        }

        {
            File file = new File(cfg.getLastDBFImportPath(), S_UET);
            DBF dbfUET = createDBF(file);
            HashMap<ColUet, Field> fieldsUet = new HashMap<ColUet, Field>();
            try {
                for (int i = 0; i < ColVisit.values().length; i++) {
                    ColUet col = ColUet.values()[i];
                    fieldsUet.put(col, dbfUET.getField(col.toString()));
                }
            } catch (xBaseJException ex) {
                throw new ClipsException("Ошибка при чтении данных из файла " + dbfUET.getName(), ex);
            }

            int recordCount = dbfUET.getRecordCount();
            for (int c = 0; c < recordCount; c++) {
                try {
                    dbfUET.read();
                    String id = fieldsUet.get(ColUet.LEVELMES).get().trim();
                    String price = fieldsUet.get(ColUet.PRICE).get().trim();
                    VisitPrice vp = new VisitPrice(id + "29000", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                    vp = new VisitPrice(id + "29824", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                    vp = new VisitPrice(id + "29825", price);
                    if (visitPriceSet.contains(vp)) {
                        visitPriceSet.remove(vp);
                    }
                    visitPriceSet.add(vp);
                    System.out.println(vp.getId() + " " + vp.getPrice());
                } catch (IOException ex) {
                    closeDBF(dbfUET);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfUET.getName(), ex);
                } catch (xBaseJException ex) {
                    closeDBF(dbfUET);
                    throw new ClipsException("Ошибка при чтении данных из файла " + dbfUET.getName(), ex);
                }
            }
            closeDBF(dbfUET);
        }

        contract.updateOMIPrice(visitPriceSet);
    }
View Full Code Here

        try {
            DialogContractM dialogContract = new DialogContractM(MainWindow.mainWindow);
            dialogContract.setVisible(true);

            if (dialogContract.getDlgResult() == ModalDialog.DLG_OK) {//договор выбран
                ContractLocal contractLocal = dialogContract.getContract();//берём его
                DirectoryCollaboratorItem dirCollab = dialogContract.getCollaborator();//коллаба тоже
                //коллаба тоже
                SearchResult result = dialogContract.getResult();
                DialogNewProfCheckup profCheckupDialog
                        = new DialogNewProfCheckup(MainWindow.mainWindow, dirCollab ,contractLocal, getAuditManager());
View Full Code Here

            tfPayed.setText("Информация недоступна");
            tfPayed.setToolTipText(MessageBox.parseException(ex));
        }
        //Договор
        try {
            ContractLocal contract = serRenLocal.getPolisData().getContract();
            String type  = Contract.TYPES_ARRAY[contract.getType()].toString();
            tfContract.setText(contract.getIndex() + " (" + type + ")");
        } catch (ClipsException ex) {
            tfContract.setText("Информация недоступна");
            tfContract.setToolTipText(MessageBox.parseException(ex));
        }
        //Оказана
View Full Code Here

    private void btContractActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btContractActionPerformed
        if (tabSerRenList.getSelectedRowCount() > 0) {
            try {
                SerRenLocal service = serRenList.get(tabSerRenList.getSelectedRowSorted());
                ContractLocal c = service.getPolisData().getContract();
                if (c != null) {
                    PanelContractInfo panel = new PanelContractInfo(getContainer(), c);
                    getContainer().addNewPage(panel, this);
                }
            } catch (PageException ex) {
View Full Code Here

TOP

Related Classes of clips.delegate.contract.ContractLocal$ServiceSpecialityList

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.