/** * Set the user ID. * @param iChangeType * @param bDisplayOption The display option. * @return The error code. */ public int setUserID(int iChangeType, boolean bDisplayOption) { int iErrorCode = DBConstants.NORMAL_RETURN; IntegerField thisField = (IntegerField)this.getOwner().getField(m_iFieldSeq); int iUserID = -1; if (this.getOwner().getRecordOwner() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()) != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID()); boolean bOldModified = thisField.isModified(); boolean[] rgbEnabled = null; if (iChangeType == DBConstants.INIT_MOVE) rgbEnabled = thisField.setEnableListeners(false); iErrorCode = thisField.setValue(iUserID, bDisplayOption, iChangeType); if (iChangeType == DBConstants.INIT_MOVE) { // Don't change the record on an init thisField.setEnableListeners(rgbEnabled); thisField.setModified(bOldModified); } return iErrorCode; } }
/** * Set the user ID. * @param iChangeType * @param bDisplayOption The display option. * @return The error code. */ public int setUserID(int iChangeType, boolean bDisplayOption) { int iErrorCode = DBConstants.NORMAL_RETURN; IntegerField thisField = (IntegerField)this.getOwner().getField(m_iFieldSeq); int iUserID = -1; if (this.getOwner().getRecordOwner() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()) != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID()); boolean bOldModified = thisField.isModified(); boolean[] rgbEnabled = null; if (iChangeType == DBConstants.INIT_MOVE) rgbEnabled = thisField.setEnableListeners(false); iErrorCode = thisField.setValue(iUserID, bDisplayOption, iChangeType); if (iChangeType == DBConstants.INIT_MOVE) { // Don't change the record on an init thisField.setEnableListeners(rgbEnabled); thisField.setModified(bOldModified); } return iErrorCode; } }
int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field. return iErrorCode;
int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field. return iErrorCode;
int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field. return iErrorCode;