Exemplo n.º 1
0
        public AccountDetailStruct GetAccountDetail(uint accountID)
        {
            AccountDetailStruct result = new AccountDetailStruct();

            try
            {
                access.SelectAccount(accountID);
                result.accountID = accountID;
                result.userID    = access.GetOwner();
                result.balance   = access.GetBalance();
            }
            catch (Exception)
            {
                var response = new HttpResponseMessage(HttpStatusCode.NotFound)
                {
                    Content      = new StringContent("Account details could not be retreived"),
                    ReasonPhrase = "Account could not be found"
                };
                throw new HttpResponseException(response);
            }
            return(result);
        }
Exemplo n.º 2
0
 public uint GetBalance()
 {
     return(accountAccess.GetBalance());
 }