Beispiel #1
0
        public ActionResult EditQuestion(string id)                                 // sửa câu hỏi( lấy thông tin cũ)
        {
            if (!user.IsAdmin())
            {
                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"));
            }
        }