public void _getStatus(StatusGetC nStatusGetC, long nTicks, uint nAccountMgrId, uint nAccountId) { SqlCommand sqlCommand_ = new SqlCommand(); this._getStatusCommand(sqlCommand_, nTicks, nAccountMgrId, nAccountId); StatusSelectB statusSelectB_ = new StatusSelectB(); SqlService sqlService_ = __singleton <SqlService> ._instance(); if (sqlService_._runSqlCommand(sqlCommand_, statusSelectB_)) { statusSelectB_._initStatusGetC(nStatusGetC); nStatusGetC.m_tErrorCode = StatusError_.mSucess_; } else { nStatusGetC.m_tErrorCode = StatusError_.mSql_; } nStatusGetC.m_tTicks = mTicks; }
void _getStatusCommand(SqlCommand nSqlCommand, long nTicks, uint nAccountMgrId, uint nAccountId) { int pos = 0; foreach (StatusId i in mStatusIds) { if (i._getTicks() > nTicks) { break; } uint tableId_ = i._getTableId(); long statusId_ = i._getStatusId(); StatusSelectB statusSelectB_ = new StatusSelectB(nAccountMgrId, tableId_, nAccountId); statusSelectB_._addStatusId(statusId_); ++pos; if (pos > 5) { break; } } }