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 })); }
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; } }
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; } }
public IHttpActionResult GetAllOnlyQuestions() { try { ILandingPageSurvey surveyService = new LandingPageSurvey(); return(Json(new Response { Message = "Data received successfuly", Status = true, Data = surveyService.GetAllQuestions() })); } catch (Exception) { throw; } }