Example #1
0
        public ErrorCode_ _createAccount(string nAccountName, string nNickname, string nPassward)
        {
            AccountB accountB_ = new AccountB();

            accountB_._setAccountName(nAccountName);
            accountB_._setNickName(nNickname);
            accountB_._setPassward(nPassward);
            accountB_._setMgrId(mId);
            accountB_._setTicks(DateTime.Now.Ticks);

            MySqlInsert mySqlInsert_ = new MySqlInsert();

            mySqlInsert_._selectStream(accountB_._streamName());
            accountB_._serialize(mySqlInsert_);

            MySqlSingleton mySqlSingleton_ = __singleton <MySqlSingleton> ._instance();

            SqlStatus_ sqlStatus_ = mySqlSingleton_._runSql(mySqlInsert_);

            return(_getErrorCode(sqlStatus_));
        }
Example #2
0
        __tuple <SqlStatus_, AccountB> _LoginAccountB(string nAccountName)
        {
            AccountB accountB_ = new AccountB();

            accountB_._setMgrId(mId);
            accountB_._setAccountName(nAccountName);

            MySqlSelect mySqlSelect_ = new MySqlSelect();

            mySqlSelect_._selectStream(accountB_._streamName());
            accountB_._serialize(mySqlSelect_);

            MySqlWhere mySqlWhere_ = new MySqlWhere();

            mySqlWhere_._selectStream(accountB_._loginWhere());

            MySqlSingleton mySqlSingleton_ = __singleton <MySqlSingleton> ._instance();

            SqlStatus_ sqlStatus_ = mySqlSingleton_._runSql(mySqlSelect_, mySqlWhere_, accountB_);

            return(new __tuple <SqlStatus_, AccountB>(sqlStatus_, accountB_));
        }