Пример #1
0
  @Override
  public erp.lib.data.SDataRegistry getRegistry() {
    if (moExchangeRate == null) {
      moExchangeRate = new SDataExchangeRate();
      moExchangeRate.setPkCurrencyId(moFieldPkCurrencyId.getKeyAsIntArray()[0]);
      moExchangeRate.setPkDateId(moFieldPkDateId.getDate());
      moExchangeRate.setFkUserNewId(miClient.getSession().getUser().getPkUserId());
    } else {
      moExchangeRate.setFkUserEditId(miClient.getSession().getUser().getPkUserId());
    }

    moExchangeRate.setExchangeRate(moFieldExchangeRate.getDouble());
    moExchangeRate.setIsDeleted(moFieldIsDeleted.getBoolean());

    return moExchangeRate;
  }
  public void focusLostYear() {
    int[] date = null;

    if (jckShowPayDays.isSelected()) {
      date = SLibTimeUtils.digestDate(miClient.getSession().getCurrentDate());
      moFieldDateRef.setFieldValue(
          SLibTimeUtils.createDate(moFieldYear.getInteger(), date[1], date[2]));
    }
  }
  private void itemStateChangedShowPayDays() {
    int[] date = null;

    if (jckShowPayDays.isSelected()) {
      jftDateRef.setEnabled(true);
      jbPickDateRef.setEnabled(true);

      date = SLibTimeUtils.digestDate(miClient.getSession().getCurrentDate());
      moFieldDateRef.setFieldValue(
          SLibTimeUtils.createDate(moFieldYear.getInteger(), date[1], date[2]));
    } else {
      jftDateRef.setEnabled(false);
      jbPickDateRef.setEnabled(false);

      moFieldDateRef.resetField();
    }
  }