Beispiel #1
0
 public int ChangePassword(BlogUserViewModel bloguserViewModel)
 {
     try
     {
         var result = BlogUserServiceHttpClient.PostAsync(ADDRESS + "changepassword", new StringContent(JsonConvert.SerializeObject(bloguserViewModel), Encoding.UTF8, "application/json")).Result;
         return(result.Content.ReadAsAsync <int>().Result);
     }
     catch (FaultException e)
     {
         throw new ApplicationException(e.Message);
     }
 }
Beispiel #2
0
 public BlogUserViewModel GetBlogUserNameAndPassword(BlogUserViewModel incomingUser)
 {
     try
     {
         var result = BlogUserServiceHttpClient.PostAsync(ADDRESS + "checkusernameandpassword", new StringContent(JsonConvert.SerializeObject(incomingUser), Encoding.UTF8, "application/json")).Result;
         return(result.Content.ReadAsAsync <BlogUserViewModel>().Result);
     }
     catch (FaultException e)
     {
         throw new ApplicationException(e.Message);
     }
 }