public HttpResponseMessage GetServerTime(dynamic SearchForm) { try { DataTable dt = new DataTable(); UserClass CLE = new UserClass(); dt = CLE.FN_ServerTime(); string ServerTime = ""; if (dt.Rows.Count > 0) { ServerTime = dt.Rows[0]["ServerTime"].ToString(); } return(Request.CreateResponse(HttpStatusCode.OK, ServerTime)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_Internal_Server_Error")); } }