Esempio n. 1
0
  /**
   * Description of the Method
   *
   * @param ctx Description of the Parameter
   * @param conn Description of the Parameter
   * @param instance Description of the Parameter
   * @param msgs Description of the Parameter
   * @param manager Description of the Parameter
   * @param assistor Description of the Parameter
   * @return Description of the Return Value
   */
  public int preInsert(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      ErrorMessages msgs,
      EventManager manager,
      SqlAssistor assistor) {
    int seqNo = (int) SerialNumber.getNextSN("BMLOANADMCHANGE", "SEQNO");
    // System.out.println("Seqno:"+seqNo);

    instance.setValue("SEQNO", seqNo);
    assistor.setSqlFieldValue(assistor.getDefaultTbl(), "SEQNO", seqNo + "");
    MyDB.getInstance().addDBConn(conn);
    return InactLoanMan.loanAdmByChange(this.bmno, ctx.getParameter("NEWADM"));
  }
Esempio n. 2
0
  /**
   * Description of the Method
   *
   * @param ctx Description of the Parameter
   * @param conn Description of the Parameter
   * @param instance Description of the Parameter
   * @param msgs Description of the Parameter
   * @param manager Description of the Parameter
   * @return Description of the Return Value
   */
  public int beforeInsert(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      ErrorMessages msgs,
      EventManager manager) {
    instance.setValue("OLDADM", ctx.getParameter("ADMINEDBY"));
    instance.setValue("CREATEDATE", SystemDate.getSystemDate5(""));
    instance.setFieldReadonly("OLDADM", true);
    instance.setFieldReadonly("CREATEDATE", true);
    instance.setValue("BMNO", this.bmno);
    instance.setFieldReadonly("BMNO", true);
    instance.setValue("OPERATOR", SessionInfo.getLoginUserName(ctx));
    instance.setValue("OLDADM", InactLoanMan.getInactLoan(this.bmno).adminedBy);

    return 0;
  }