Package clips.delegate.doctor.sicklist

Examples of clips.delegate.doctor.sicklist.SicklistLocal


        if (tblSicklistList.getSelectedRowCount() == 0) {//если ничё не выделено
            MessageBox.showWarning(MessageBox.W_SICKLIST_NOT_SELECT);//кинем месседж
            return;//и откат
        }
        //возмём выделенный больничный
        SicklistLocal sl = sicklistLocalList.get(tblSicklistList.getSelectedRowSorted());
        try {
            //если номер выставлен, то ругаемсо и откат
            if (sl.getSerial() != null && !sl.getSerial().isEmpty()) {
                MessageBox.showWarning(MessageBox.W_CANT_DEL_REGISTRED_SICKLIST);
                return;
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
            return;
        }
        try {//и наконец если всё нормально
            //просим подтвердить удаление
            int res = MessageBox.showConfirmYesNo(MessageBox.C_DEL_SICKLIST);
            if (res == MessageBox.ANSWER_OK){//есть подтверждение
                sl.remove();//удалим
                CollectionUtils.removeObectByPtr(sicklistLocalList, sl);
                updateTable();//обновим таблицу
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
View Full Code Here


            try {
                int row = tblSicklistList.getSelectedRowSorted();
                if (row < 0) {
                    return;
                }
                SicklistLocal sicklist = sicklistLocalList.get(row);
                sicklist.printOverBlank();
            } catch (ClipsException ex) {
                MessageBox.showException(ex);
            }
        }
    }
View Full Code Here

        mapSickList = new HashMap<String, SicklistLocal>();
        List<SicklistLocal> s = clientLocal.getSicklistList();
    ArrayList<String> list = new ArrayList<String>();
    // разварачиваю список, так как больничные приходят отсортированными, самые последние в низу
        for (int i = s.size() - 1; i >= 0; i--) {
      SicklistLocal sicklistLocal = s.get(i);
            if (sicklistLocal.isClosed()){
                mapSickList.put(sicklistLocal.getSerial(), sicklistLocal);
        list.add(sicklistLocal.getSerial());
            }
        }
        if (!mapSickList.isEmpty()){
            cbContinue.setModel(new DefaultComboBoxModel(list.toArray()));
        } else {
View Full Code Here

                MessageBox.showWarning(MessageBox.W_NEED_TO_SET_FIELDS);
            } else {
                if (sicklist != null) {
                    throw new ClipsException("Больничный лист уже создан");
                }
                sicklist = new SicklistLocal(clientLocal);
                //main page
                if (typeOpenedListRadio.isSelected()) {
                    sicklist.setSerial(serialNumber.getText());
                    sicklist.setRegistrator(UserInfo.get().getCollaborator());
                }
View Full Code Here

    private void typeContinueListRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_typeContinueListRadioActionPerformed
        disableControls();
        try {
            dateOtherRadio.setSelected(true);
            SicklistLocal oldSll = mapSickList.get(cbContinue.getSelectedItem());
            Calendar dateTill = (Calendar) oldSll.getDateToWork().clone();
            otherDate.setCalendar(dateTill);
      setMode(Mode.continueExist);
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
View Full Code Here

    }//GEN-LAST:event_typeContinueListRadioActionPerformed

    private void cbContinueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbContinueActionPerformed
        try {
            if (dateOtherRadio.isSelected() ) {
                SicklistLocal oldSll = mapSickList.get(cbContinue.getSelectedItem());
                Calendar dateClose = (Calendar) oldSll.getDateToWork().clone();
                otherDate.setCalendar(dateClose);
            }
            updateSummaryText();
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
View Full Code Here

private void jTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableMouseClicked
        if (evt.getClickCount() == 2) {
            int row = jTable.getSelectedRowSorted();
                if (row >= 0) {
                try {
                    SicklistLocal sl = collector.getChildren().get(row);
                    if (getContainer() instanceof PanelEMC) {
                        ((PanelEMC) getContainer()).selectInEmc(sl);
                    }
                } catch (ClipsException ex) {
                    ex.printStackTrace();
View Full Code Here


    @Override
    public Object getValueAt(int row, int col) {
        try {
            SicklistLocal dl = sicklistList.get(row);
            switch (col) {
                case COL_CLIENT: {
                    return dl.getClient().getFIO();
                }
                case COL_SERIAL: {
                    return dl.getSerial();
                }
                case COL_COLLABORATOR: {
                    if (dl.getOpener() == null) {
                        return dl.getAltOpener();
                    } else {
                        return  dl.getOpener().toString();
                    }
                }
                case COL_CLOSED: {
                    return dl.isClosed();
                }
                case COL_DATEOPEN: {
                    return dl.getDateOpen().getTime();
                }
                case COL_DIAGNOSIS: {
          if (dl.isClosed()){
            return dl.getDiagnosisClose().getMkb().toString();
          }
          else{
            return dl.getDiagnosisOpen().getMkb().toString();
          }
                }
                default: throw new IllegalArgumentException("Некорректный номер столбца");
            }
        } catch (ClipsException ex) {
View Full Code Here

     * @return истина если нет номера
     */
    public boolean isCellColored(int row, int col){
        if (col == COL_SERIAL) {
            try {
                SicklistLocal dl = sicklistList.get(row);
                if (!dl.isClosed()) {
                    if (dl.isSerialNotSavedYet()) {
                        return true;
                    }
                }
            } catch (ClipsException ex) {
                ex.printStackTrace();
View Full Code Here

private void jTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableMouseClicked
        if (evt.getClickCount() == 2) {
            int row = jTable.getSelectedRowSorted();
                if (row >=0 ) {
                SicklistLocal sl = sicklistList.get(row);
                if (getContainer() instanceof PanelEMC) {
                    try {
                        ((PanelEMC) getContainer()).selectInEmc(sl);
                    } catch (ClipsException ex) {
                        ex.printStackTrace();
View Full Code Here

TOP

Related Classes of clips.delegate.doctor.sicklist.SicklistLocal

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.