Exemplo n.º 1
0
  private void actionGetLayout() {
    SDbBankLayout bankLayout = null;

    bankLayout = readLayout();
    if (bankLayout != null) {
      SFinUtilities.writeLayout((SClientInterface) miClient, bankLayout.getLayoutText(), "");
    }
  }
Exemplo n.º 2
0
  @Override
  public void actionRowEdit(boolean showSystemRegistries) {
    SDbBankLayout bankLayout = null;

    if (jbRowEdit.isEnabled()) {
      if (jtTable.getSelectedRowCount() != 1) {
        miClient.showMsgBoxInformation(SGridConsts.MSG_SELECT_ROW);
      } else {
        SGridRowView gridRow = (SGridRowView) getSelectedGridRow();
        SGuiParams params = null;

        if (gridRow.getRowType() != SGridConsts.ROW_TYPE_DATA) {
          miClient.showMsgBoxWarning(SGridConsts.ERR_MSG_ROW_TYPE_DATA);
        } else if (!showSystemRegistries && gridRow.isRowSystem()) {
          miClient.showMsgBoxWarning(
              SDbConsts.MSG_REG_ + gridRow.getRowName() + SDbConsts.MSG_REG_IS_SYSTEM);
        } else if (!gridRow.isUpdatable()) {
          miClient.showMsgBoxWarning(
              SDbConsts.MSG_REG_ + gridRow.getRowName() + SDbConsts.MSG_REG_NON_UPDATABLE);
        } else if (moPaneSettings.isUserInsertApplying()
            && mnUserLevelAccess == SUtilConsts.LEV_AUTHOR
            && gridRow.getFkUserInsertId() != miClient.getSession().getUser().getPkUserId()) {
          miClient.showMsgBoxWarning(SDbConsts.MSG_REG_DENIED_RIGHT);
        } else {
          bankLayout =
              (SDbBankLayout)
                  miClient
                      .getSession()
                      .readRegistry(
                          SModConsts.FIN_LAY_BANK,
                          gridRow.getRowPrimaryKey(),
                          SDbConsts.MODE_VERBOSE);

          if (bankLayout.getLayoutStatus() == SFinConsts.LAY_BANK_APPROVED_ST) {
            miClient.showMsgBoxWarning(
                "El layout no puede ser modificado en estatus "
                    + SFinConsts.LAY_BANK_APPROVED_TEXT_ST);
          } else if (bankLayout.getDocsPayed() > 0) {
            miClient.showMsgBoxWarning(
                SDbConsts.MSG_REG_DENIED_UPDATE + "\n¡Existen documentos con pagos aplicados!");
          } else if (bankLayout.getTransfersPayed() > 0) {
            miClient.showMsgBoxWarning(
                SDbConsts.MSG_REG_DENIED_UPDATE + "\n¡Existen transferencias con pagos aplicados!");
          } else {
            params = moFormParams != null ? moFormParams : new SGuiParams();
            params.setKey(gridRow.getRowPrimaryKey());

            miClient
                .getSession()
                .getModule(mnModuleType, mnModuleSubtype)
                .showForm(mnGridType, mnGridSubtype, params);
            moFormParams = null;
          }
        }
      }
    }
  }
Exemplo n.º 3
0
  private void actionBack() {
    SDbBankLayout bankLayout = null;

    bankLayout = readLayout();
    if (bankLayout != null) {
      try {
        if (bankLayout.getLayoutStatus() == SFinConsts.LAY_BANK_APPROVED_ST) {
          SFinUtils.changeLayoutStatus(miClient, bankLayout, SFinConsts.LAY_BANK_NEW_ST);
          miClient.getSession().notifySuscriptors(mnGridType);
        }
      } catch (Exception e) {
        SLibUtils.printException(this, e);
      }
    } else {
      miClient.showMsgBoxWarning("Error al leer el layout");
    }
  }