Exemple #1
0
 public HttpResponseMessage getUserByUsername(HttpRequestMessage request, string userName)
 {
     return(CreateHttpResponse(request, () =>
     {
         var base64EncodedBytes = System.Convert.FromBase64String(userName);
         userName = System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
         ApplicationUser user = _userService.getByUserName(userName);
         decimal?totalEarn = _transactionDetailService.GetTotalEarnMoneyByUsername(userName);
         var response = Mapper.Map <ApplicationUser, ApplicationUserViewModel>(user);
         response.TotalEarn = totalEarn;
         var responseData = request.CreateResponse(HttpStatusCode.OK, response);
         return responseData;
     }));
 }
        public decimal?GetEarnMoneyByUserName(string userName)
        {
            decimal?totalEarn = _transactionDetailService.GetTotalEarnMoneyByUsername(userName);

            return(totalEarn);
        }