예제 #1
0
 public IHttpActionResult GetUserByID([FromBody] JObject data)
 {
     try
     {
         int userID = !string.IsNullOrEmpty(data.SelectToken("UserID").Value <string>()) ? Convert.ToInt32(data.SelectToken("UserID").Value <string>()) : 0;
         var user   = manageUser.GetUserByID(userID);
         return(Json(new
         {
             status = true,
             data = user
         }));
     }
     catch (Exception ex)
     {
         return(Json(new { status = false, message = "Unknown error occurred" }));
     }
 }