コード例 #1
0
        public IHttpActionResult PostSurveyOptions(int questionId, List <SurveyQuestionOption> surveyQuestionOptions)
        {
            ILandingPageSurvey surveyService = new LandingPageSurvey();

            surveyService.CreateOptions(questionId, surveyQuestionOptions);
            return(Json(new Response
            {
                Message = "Questions created successfuly",
                Status = true,
                Data = null
            }));
        }
コード例 #2
0
 public IHttpActionResult PostSurveyQuestions(List <SurveyQuestion> surveyQuestionList)
 {
     try
     {
         ILandingPageSurvey surveyService = new LandingPageSurvey();
         surveyService.CreateQuestions(surveyQuestionList);
         return(Json(new Response
         {
             Message = "Questions created successfuly",
             Status = true,
             Data = null
         }));
     }
     catch (Exception e) {
         throw e;
     }
 }
コード例 #3
0
 public IHttpActionResult GetSurveyQuestionsById(int id)
 {
     try
     {
         ILandingPageSurvey surveyService = new LandingPageSurvey();
         return(Json(new Response
         {
             Message = "Data received successfuly",
             Status = true,
             Data = surveyService.GetQuestionById(id)
         }));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #4
0
 public IHttpActionResult GetAllOnlyQuestions()
 {
     try
     {
         ILandingPageSurvey surveyService = new LandingPageSurvey();
         return(Json(new Response
         {
             Message = "Data received successfuly",
             Status = true,
             Data = surveyService.GetAllQuestions()
         }));
     }
     catch (Exception)
     {
         throw;
     }
 }