public HttpResponseMessage Survey(int responseId) { try { HPSDataController dataController = new HPSDataController(); var item = dataController.GetSurvey(responseId); return(Request.CreateResponse(HttpStatusCode.OK, item)); } catch (Exception ex) { //Log to DotNetNuke and reply with Error Exceptions.LogException(ex); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }
public HttpResponseMessage Survey(SurveySummaryModel survey) { try { HPSDataController dataController = new HPSDataController(); dataController.SaveSurveySummaryData(survey); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch (Exception ex) { //Log to DotNetNuke and reply with Error Exceptions.LogException(ex); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }