// GET: Admin/UserQuestion
        //get list of new questions and answered questions
        public ActionResult Index()
        {
            var data = new UserQuestionDao(_unitOfWork).GetAll();

            ViewBag.newQ  = data.OrderByDescending(s => s.QuesDateCreate).Where(s => s.QuesNew == true);
            ViewBag.reply = data.OrderByDescending(s => s.AnswerDateCreate).Where(s => s.QuesNew == false);
            return(View());
        }
        //get content of question by id
        public ActionResult QuesDetail(int id)
        {
            var data = new UserQuestionDao(_unitOfWork).GetByid(id);

            return(View(data));
        }
예제 #3
0
 // GET: Admin/Navigation
 //Display the number of questions the user needs admin to answer
 public PartialViewResult Index()
 {
     TempData["CountQuestion"] = new UserQuestionDao(_unitOfWork).GetAll().Count(s => s.QuesNew).ToString();
     return(PartialView());
 }