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

            try
            {
                test test = Model.GetTest(test_code);
                Model.UpdateLastSeen("Sửa Đề Thi " + test.test_code, Url.Action("EditTest/" + id));
                return(View(test));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }