/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if (iChangeType == DBConstants.AFTER_REFRESH_TYPE) iErrorCode = this.moveIDToCodeField(); else if ((iChangeType == DBConstants.AFTER_ADD_TYPE) && (this.getCodeField().isNull())) { try { Record record = this.getOwner(); Object bookmark = record.getLastModified(DBConstants.BOOKMARK_HANDLE); record.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE); record.edit(); iErrorCode = this.moveIDToCodeField(); record.set(); } catch (DBException ex) { ex.printStackTrace(); } } return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if (iChangeType == DBConstants.AFTER_REFRESH_TYPE) iErrorCode = this.moveIDToCodeField(); else if ((iChangeType == DBConstants.AFTER_ADD_TYPE) && (this.getCodeField().isNull())) { try { Record record = this.getOwner(); Object bookmark = record.getLastModified(DBConstants.BOOKMARK_HANDLE); record.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE); record.edit(); iErrorCode = this.moveIDToCodeField(); record.set(); } catch (DBException ex) { ex.printStackTrace(); } } return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if (iChangeType == DBConstants.AFTER_REFRESH_TYPE) iErrorCode = this.moveIDToCodeField(); else if ((iChangeType == DBConstants.AFTER_ADD_TYPE) && (this.getCodeField().isNull())) { try { Record record = this.getOwner(); Object bookmark = record.getLastModified(DBConstants.BOOKMARK_HANDLE); record.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE); record.edit(); iErrorCode = this.moveIDToCodeField(); record.set(); } catch (DBException ex) { ex.printStackTrace(); } } return iErrorCode; } /**