Example #1
0
        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 StatusOptionB(uint nAccountMgrId, StatusOption nStatusOption)
 {
     mTableId      = nStatusOption._getTableId();
     mAccountMgrId = nAccountMgrId;
 }