Esempio n. 1
0
        private void SaveToken(OAuthToken token, string code)
        {
            DBAccess dba = new DBAccess();
            dba.AddTable(DBConst.C3010A00);
            dba.AddWhere(DBConst.C3010A03, code);
            dba.AddWhere(DBConst.C3010A04, OAuthClient.KUAIPAN);
            dba.AddWhere(DBConst.C3010A05, CharUtil.Text2DB(token.UserId));
            dba.AddDeleteBatch();

            dba.ReInit();
            dba.AddTable(DBConst.C3010A00);
            dba.AddParam(DBConst.C3010A01, 0);
            dba.AddParam(DBConst.C3010A02, HashUtil.UtcTimeInHex(false));
            dba.AddParam(DBConst.C3010A03, code);
            dba.AddParam(DBConst.C3010A04, OAuthClient.KUAIPAN);
            dba.AddParam(DBConst.C3010A05, CharUtil.Text2DB(token.UserId));
            dba.AddParam(DBConst.C3010A06, KuaipanServer.CONSUMER_KEY);
            dba.AddParam(DBConst.C3010A07, KuaipanServer.CONSUMER_SECRET);
            dba.AddParam(DBConst.C3010A08, CharUtil.Text2DB(token.Token));
            dba.AddParam(DBConst.C3010A09, CharUtil.Text2DB(token.Secret));
            dba.AddParam(DBConst.C3010A0A, 1);
            dba.AddParam(DBConst.C3010A0B, DBConst.SQL_NOW, false);
            dba.AddParam(DBConst.C3010A0C, DBConst.SQL_NOW, false);
            dba.AddInsertBatch();

            dba.ExecuteBatch();
        }
Esempio n. 2
0
 public DBankClient(OAuthConsumer consumer, OAuthToken token, bool isRoot)
     : base(consumer)
 {
 }