Example #1
0
        public void GetAccountIdByName(string accountName, out uint id)
        {
            AccountByName ret      = new AccountByName();
            var           criteria = new Dictionary <string, object> {
                { "accountName", accountName }
            };

            ExecuteConstructedGetStatement <AccountByName, AuthenticationPreparedStatement>(AuthenticationPreparedStatement.AccountSelectByName, criteria, ret);
            id = ret.AccountId;
        }
Example #2
0
        public Account GetAccountByName(string accountName)
        {
            AccountByName ret      = new AccountByName();
            var           criteria = new Dictionary <string, object> {
                { "accountName", accountName }
            };
            bool success = ExecuteConstructedGetStatement <AccountByName, AuthenticationPreparedStatement>(AuthenticationPreparedStatement.AccountSelectByName, criteria, ret);

            if (success)
            {
                return(GetAccountById(ret.AccountId));
            }

            return(null);
        }