/** * 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) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record (Move the header record data down) if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) { double dControlValue = m_fldSource.getValue(); double dFieldValue = m_fldDest.getValue(); if (dControlValue == dFieldValue) iErrorCode = m_fldSource.setValue(dFieldValue + this.getBumpValue(), bDisplayOption, DBConstants.SCREEN_MOVE); else if (dControlValue < dFieldValue) iErrorCode = m_fldSource.moveFieldToThis(m_fldDest, bDisplayOption, DBConstants.SCREEN_MOVE); } 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) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record (Move the header record data down) if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) { double dControlValue = m_fldSource.getValue(); double dFieldValue = m_fldDest.getValue(); if (dControlValue == dFieldValue) iErrorCode = m_fldSource.setValue(dFieldValue + this.getBumpValue(), bDisplayOption, DBConstants.SCREEN_MOVE); else if (dControlValue < dFieldValue) iErrorCode = m_fldSource.moveFieldToThis(m_fldDest, bDisplayOption, DBConstants.SCREEN_MOVE); } 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) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record (Move the header record data down) if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) { double dControlValue = m_fldSource.getValue(); double dFieldValue = m_fldDest.getValue(); if (dControlValue == dFieldValue) iErrorCode = m_fldSource.setValue(dFieldValue + this.getBumpValue(), bDisplayOption, DBConstants.SCREEN_MOVE); else if (dControlValue < dFieldValue) iErrorCode = m_fldSource.moveFieldToThis(m_fldDest, bDisplayOption, DBConstants.SCREEN_MOVE); } return iErrorCode; } /**