예제 #1
0
 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));
     }
 }
예제 #2
0
 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));
     }
 }