--- as_slot.cpp 2003/01/23 14:38:47 1.83
+++ as_slot.cpp 2003/01/23 18:04:45 1.84
@@ -1225,12 +1225,12 @@
}
// Fill an account object to marshall and transmit
- int nLastrow = m_pMaintable->numRows() - 1;
- Singlerow.nDate = m_pMaintable->text(nLastrow, TITRAQ_IDXDATE).toInt();
- Singlerow.nTime = m_pMaintable->text(nLastrow, TITRAQ_IDXSTART).toInt();
- Singlerow.szName = CORBA::string_dup(m_pMaintable->text(nLastrow, TITRAQ_IDXUSER));
- Singlerow.szTask = CORBA::string_dup(m_pMaintable->text(nLastrow, TITRAQ_IDXTASK));
- Singlerow.szRemark = CORBA::string_dup(m_pMaintable->text(nLastrow, TITRAQ_IDXREMARK));
+ int nRow = m_pMaintable->currentRow();
+ Singlerow.nDate = m_pMaintable->text(nRow, TITRAQ_IDXDATE).toInt();
+ Singlerow.nTime = m_pMaintable->text(nRow, TITRAQ_IDXSTART).toInt();
+ Singlerow.szName = CORBA::string_dup(m_pMaintable->text(nRow, TITRAQ_IDXUSER));
+ Singlerow.szTask = CORBA::string_dup(m_pMaintable->text(nRow, TITRAQ_IDXTASK));
+ Singlerow.szRemark = CORBA::string_dup(m_pMaintable->text(nRow, TITRAQ_IDXREMARK));
Account->Log(Singlerow); // Finally transmit to server
m_pStatbar->message(trUtf8("Successful transmission of accounting data"));
@@ -1263,10 +1263,10 @@
// A quasi diff summary to transmit to the server
QString Syncthis;
- int nLastrow = m_pMaintable->numRows() - 1;
- Syncthis += m_pMaintable->text(nLastrow, 0);
+ int nRow = m_pMaintable->currentRow();
+ Syncthis += m_pMaintable->text(nRow, 0);
for (int nIter = 1; nIter < TITRAQ_IDXTAIL; nIter++)
- Syncthis += ' ' + m_pMaintable->text(nLastrow, nIter);
+ Syncthis += ' ' + m_pMaintable->text(nRow, nIter);
Clistr = Syncthis; // Build RPC parameter
Logmeth.AddParameter("Tuple") << Clistr; // Prepare for marshalling
|