예제 #1
0
        public ActionResult EditQuestion(string id)
        {
            if (!user.IsTeacher())
            {
                return(View("Error"));
            }
            int id_question = Convert.ToInt32(id);

            try
            {
                question question = Model.GetQuestion(id_question);
                Model.UpdateLastSeen("Sửa Câu Hỏi " + question.id_question, Url.Action("EditQuestion/" + id));
                ViewBag.ListSubject = Model.GetSubjects();
                return(View(question));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }