public String edit() {
    info.setEditUserNo(UserHelper.getEditUserNo());
    int id = 0;
    if (this.getOper().equalsIgnoreCase("add")) {
      info.setInUserNo(UserHelper.getEditUserNo());
      id = TempRecruitDetailModel.add(info);
      if (id > 0) {
        this.setErrDesc(String.valueOf(id));
      } else {
        this.setErrCode("add failed");
        this.setErrDesc("add failed");
      }

    } else {
      if (info.getId() == 0) {
        this.setErrCode("NoID");
        this.setErrDesc("NoID");
      } else {
        if (this.getOper().equalsIgnoreCase("edit")) {
          if (TempRecruitDetailModel.update(info) > 0) {
            this.setErrDesc(String.valueOf(info.getId()));
          } else {
            this.setErrCode("update failed");
            this.setErrDesc("update failed");
          }
        }
      }
    }

    return SUCCESS;
  }
Ejemplo n.º 2
0
  public String edit() {
    info.setEditUserNo(UserHelper.getEditUserNo());
    int id = 0;
    if (this.getOper().equalsIgnoreCase("add")) {
      info.setInUserNo(UserHelper.getEditUserNo());
      id = PaymentRefundModel.add(info);
      if (id > 0) {
        this.setErrDesc(String.valueOf(id));
      } else {
        this.setErrCode("add failed");
        this.setErrDesc("add failed");
      }

    } else {
      if (info.getId() == 0) {
        this.setErrCode("NoID");
        this.setErrDesc("NoID");
      } else {
        if (this.getOper().equalsIgnoreCase("edit")) {
          PaymentRefund paymentRefund = PaymentRefundModel.getInfo(info.getId());
          info.setSalesNo(paymentRefund.getSalesNo());
          info.setP2pProductNo(paymentRefund.getP2pProductNo());
          // info.setP2pCustomerNo(paymentRefund.getP2pCustomerNo());
          info.setCustomerNo(paymentRefund.getCustomerNo());
          info.setPayerNo(paymentRefund.getPayerNo());
          if (PaymentRefundModel.update(info) > 0) {
            this.setErrDesc(String.valueOf(info.getId()));
          } else {
            this.setErrCode("update failed");
            this.setErrDesc("update failed");
          }
        }
      }
    }

    return SUCCESS;
  }
Ejemplo n.º 3
0
  private void initPageVar() {
    StringBuilder sb = new StringBuilder();

    sb.append("<script type=\"text/javascript\">");
    sb.append("var PageVar={");
    sb.append(String.format("%1$s:'%2$s',", "ID", this.id));
    sb.append(String.format("%1$s:'%2$s',", "UserId", UserHelper.getEditUserNo()));
    sb.append("};");

    sb.append("var ElementVar={");
    for (TagPermissionView tagPermissionView :
        this.getPagePermissionView().getTagPermissionViewList()) {
      sb.append(
          String.format(
              "%1$s:'%2$s',",
              tagPermissionView.getTagName(),
              String.valueOf(tagPermissionView.getTagPermissionType())));
    }
    sb.append("};");

    sb.append("</script>");

    this.pageVar = sb.toString();
  }