Example #1
0
        public ActionResult EditSubject(string id)                                  // sửa thông tin môn(lấy thông tin cũ)
        {
            if (!user.IsAdmin())
            {
                return(View("Error"));
            }
            int id_subject = Convert.ToInt32(id);

            try
            {
                subject subject = Model.GetSubject(id_subject);
                Model.UpdateLastSeen("Sửa Môn " + subject.subject_name, Url.Action("EditSubject/" + id));
                return(View(subject));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }