/** * Reset the field count. */ public int resetCount() { if (iInvoiceTrxStatus == -1) this.firstTime(); iTrxStatus = iInvoiceTrxStatus; return super.resetCount(); } /**
/** * Reset the field count. */ public int resetCount() { if (iInvoiceTrxStatus == -1) this.firstTime(); iTrxStatus = iInvoiceTrxStatus; return super.resetCount(); } /**
/** * Reset the field count. */ public int resetCount() { int iErrorCode = super.resetCount(); Record booking = m_fldMain.getRecord(); for (int iFieldSeq = booking.getFieldSeq(Booking.SINGLE_PAX); iFieldSeq <= booking.getFieldSeq(Booking.QUAD_PAX); iFieldSeq++) { // Zero all the other fields iErrorCode = this.setFieldCount(iFieldSeq, 0, true); } return iErrorCode; } /**
/** * Reset the field count. */ public int resetCount() { int iErrorCode = super.resetCount(); Record booking = m_fldMain.getRecord(); for (int iFieldSeq = booking.getFieldSeq(Booking.SINGLE_PAX); iFieldSeq <= booking.getFieldSeq(Booking.QUAD_PAX); iFieldSeq++) { // Zero all the other fields iErrorCode = this.setFieldCount(iFieldSeq, 0, true); } return iErrorCode; } /**
/** * Constructor for counting the value of a field in this record. * @param fieldMain The field to receive the count. * @param ifsToCount The field in this record to add up. * @param bVerifyOnEOF Verify the total on End of File (true default). * @param bRecountOnSelect Recount the total each time a file select is called (False default). * @param bResetOnBreak Reset the counter on a control break? */ public void init(Record record, Record recordMain, int iMainFilesField, BaseField fieldMain, int ifsToCount, boolean bRecountOnSelect, boolean bVerifyOnEOF, boolean bResetOnBreak) // Init this field override for other value { super.init(record); m_fsToCount = ifsToCount; if (fieldMain != null) m_fldMain = fieldMain; else if (recordMain != null) m_fldMain = recordMain.getField(iMainFilesField); if (m_fldMain != null) if ((m_fldMain.getRecord() == null) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_NONE) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_ADD)) this.resetCount(); // Set in main file's field if the record is not current. m_dOldValue = 0; m_bRecountOnSelect = bRecountOnSelect; m_bVerifyOnEOF = bVerifyOnEOF; m_bResetOnBreak = bResetOnBreak; m_dTotalToVerify = 0; m_bEOFHit = true; // In case this is a maint screen (grid screens start by requery/set this to false) } /**
/** * Constructor for counting the value of a field in this record. * @param fieldMain The field to receive the count. * @param ifsToCount The field in this record to add up. * @param bVerifyOnEOF Verify the total on End of File (true default). * @param bRecountOnSelect Recount the total each time a file select is called (False default). * @param bResetOnBreak Reset the counter on a control break? */ public void init(Record record, Record recordMain, int iMainFilesField, BaseField fieldMain, int ifsToCount, boolean bRecountOnSelect, boolean bVerifyOnEOF, boolean bResetOnBreak) // Init this field override for other value { super.init(record); m_fsToCount = ifsToCount; if (fieldMain != null) m_fldMain = fieldMain; else if (recordMain != null) m_fldMain = recordMain.getField(iMainFilesField); if (m_fldMain != null) if ((m_fldMain.getRecord() == null) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_NONE) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_ADD)) this.resetCount(); // Set in main file's field if the record is not current. m_dOldValue = 0; m_bRecountOnSelect = bRecountOnSelect; m_bVerifyOnEOF = bVerifyOnEOF; m_bResetOnBreak = bResetOnBreak; m_dTotalToVerify = 0; m_bEOFHit = true; // In case this is a maint screen (grid screens start by requery/set this to false) } /**
/** * Constructor for counting the value of a field in this record. * @param fieldMain The field to receive the count. * @param ifsToCount The field in this record to add up. * @param bVerifyOnEOF Verify the total on End of File (true default). * @param bRecountOnSelect Recount the total each time a file select is called (False default). * @param bResetOnBreak Reset the counter on a control break? */ public void init(Record record, Record recordMain, String iMainFilesField, BaseField fieldMain, String fsToCount, boolean bRecountOnSelect, boolean bVerifyOnEOF, boolean bResetOnBreak) // Init this field override for other value { super.init(record); this.fsToCount = fsToCount; if (fieldMain != null) m_fldMain = fieldMain; else if (recordMain != null) m_fldMain = recordMain.getField(iMainFilesField); if (m_fldMain != null) if ((m_fldMain.getRecord() == null) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_NONE) || (m_fldMain.getRecord().getEditMode() == DBConstants.EDIT_ADD)) this.resetCount(); // Set in main file's field if the record is not current. m_dOldValue = 0; m_bRecountOnSelect = bRecountOnSelect; m_bVerifyOnEOF = bVerifyOnEOF; m_bResetOnBreak = bResetOnBreak; m_dTotalToVerify = 0; m_bEOFHit = true; // In case this is a maint screen (grid screens start by requery/set this to false) } /**
m_objLastBreakValue = m_fldBreak.getData(); iErrorCode = this.resetCount(); // Set in main file's field break; case DBConstants.AFTER_REQUERY_TYPE: bResetCount = false; // Don't reset a field on a current record (since that would cause the record to be re-written for no reason AND may trigger unnecessary changes) if (bResetCount) iErrorCode = this.resetCount(); // Set in main file's field if (m_fldBreak != null)
m_objLastBreakValue = m_fldBreak.getData(); iErrorCode = this.resetCount(); // Set in main file's field break; case DBConstants.AFTER_REQUERY_TYPE: bResetCount = false; // Don't reset a field on a current record (since that would cause the record to be re-written for no reason AND may trigger unnecessary changes) if (bResetCount) iErrorCode = this.resetCount(); // Set in main file's field if (m_fldBreak != null)
m_objLastBreakValue = m_fldBreak.getData(); iErrorCode = this.resetCount(); // Set in main file's field break; case DBConstants.AFTER_REQUERY_TYPE: bResetCount = false; // Don't reset a field on a current record (since that would cause the record to be re-written for no reason AND may trigger unnecessary changes) if (bResetCount) iErrorCode = this.resetCount(); // Set in main file's field if (m_fldBreak != null)