Beispiel #1
0
        public IActionResult RemoveQuestions(int id)
        {
            QuestionOperation question = new QuestionOperation();

            if (question.RemoveQuestion(id))
            {
                return(Ok(new { flag = true, msg = "deletion successfull", status = 200, }));
            }
            return(BadRequest(new { flag = false, msg = "data not found", status = 404 }));
        }
Beispiel #2
0
        public IActionResult EditviewQuestions(int id)
        {
            QuestionOperation question = new QuestionOperation();
            ViewCustomModel   data     = question.EditViewQuestion(id);

            if (data != null)
            {
                return(Ok(data));
            }
            return(BadRequest(new { msg = "data not found", status = 404 }));
        }
Beispiel #3
0
        public IActionResult ViewQuestions(String id)
        {
            id = HttpUtility.UrlDecode(id);
            QuestionOperation question = new QuestionOperation();
            var data = question.ViewQuestion(id);

            if (data != null)
            {
                return(Ok(data));
            }
            else
            {
                return(BadRequest(new { msg = "Not Found", status = 404 }));
            }
        }
Beispiel #4
0
        public List <QuestionObject> GetAllQuestion()
        {
            QuestionOperation qo = new QuestionOperation();

            return(qo.GetAllQuestion());
        }