Exemplo n.º 1
0
 public JsonResult GetUsersList()
 {
     // Calling and storing web service output
     try
     {
         _userList.GetUsers(_service);
         Response.StatusCode = (int)HttpStatusCode.OK;
         return(Json(_userList.Users, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Response.StatusCode = (int)HttpStatusCode.InternalServerError;
         return(Json(ex.ToString(), JsonRequestBehavior.AllowGet));
     }
 }