public void _runInit() { StatusService statusService_ = __singleton <StatusService> ._instance(); AccountService accountService_ = __singleton <AccountService> ._instance(); IDictionary <uint, AccountMgr> accountMgrs_ = accountService_._getAccountMgrs(); uint statusServiceId_ = statusService_._getId(); foreach (StatusOptionB i in mStatusOptionBs) { uint accountMgrId_ = i._getAccountMgrId(); if (accountMgrs_.ContainsKey(accountMgrId_)) { AccountMgr accountMgr_ = accountMgrs_[accountMgrId_]; StatusOption statusOption_ = accountMgr_._getProperty <StatusOption>(statusServiceId_); statusOption_._setTableId(i._getTableId()); } else { LogService logService_ = __singleton <LogService> ._instance(); logService_._logError(string.Format(@"StatusOptionSelectB _initStatusOption:{0}", accountMgrId_)); } } }
public void _createStatus(Account nAccount, StatusCreateS nStatusCreateS, StatusCreateC nStatusCreateC) { AccountMgr accountMgr_ = nAccount._getAccountMgr(); uint statusServiceId_ = StatusService._classId(); StatusOption statusOption_ = accountMgr_._getProperty <StatusOption>(statusServiceId_); uint tableId_ = statusOption_._getTableId(); uint accountMgrId_ = accountMgr_._getId(); SqlCommand sqlCommand_ = new SqlCommand(); if (statusOption_._createTable()) { tableId_ = statusOption_._generateTableId(); StatusTableCreateB statusTableCreateB_ = new StatusTableCreateB(tableId_, accountMgrId_); sqlCommand_._addHeadstream(statusTableCreateB_); } StatusCreateB statusCreateB_ = new StatusCreateB(nAccount, tableId_, accountMgrId_, nStatusCreateS); sqlCommand_._addHeadstream(statusCreateB_); SqlService sqlService_ = __singleton <SqlService> ._instance(); if (sqlService_._runSqlCommand(sqlCommand_)) { long statusId_ = statusCreateB_._statusId(); mTicks = statusCreateB_._getTicks(); nStatusCreateC.m_tErrorCode = StatusError_.mSucess_; nStatusCreateC.m_tStatusId = statusId_; nStatusCreateC.m_tTicks = mTicks; mStatusIds.Add(new StatusId(tableId_, statusId_, mTicks)); } else { nStatusCreateC.m_tErrorCode = StatusError_.mSql_; } }
public void _runInit() { StatusService statusService_ = __singleton <StatusService> ._instance(); AccountService accountService_ = __singleton <AccountService> ._instance(); IDictionary <uint, AccountMgr> accountMgrs_ = accountService_._getAccountMgrs(); uint statusServiceId_ = statusService_._getId(); foreach (KeyValuePair <uint, AccountMgr> i in accountMgrs_) { AccountMgr accountMgr_ = i.Value; uint accountMgrId_ = i.Key; StatusOption statusOption_ = accountMgr_._getProperty <StatusOption>(statusServiceId_); StatusOptionB statusOptionB_ = new StatusOptionB(accountMgrId_, statusOption_); mStatusOptionBs.Add(statusOptionB_); } }
public StatusOptionB(uint nAccountMgrId, StatusOption nStatusOption) { mTableId = nStatusOption._getTableId(); mAccountMgrId = nAccountMgrId; }