コード例 #1
0
        public ActionResult EditTeacher()
        {
            if (!user.IsTeacher())
            {
                return(View("Error"));
            }
            int id_teacher = Convert.ToInt32(user.ID);

            try
            {
                teacher teacher = Model.GetTeacher(id_teacher);
                Model.UpdateLastSeen("Sửa Giảng Viên " + teacher.name, Url.Action("EditTeacher/" + user.ID));
                ViewBag.ListSpecialities = Model.GetSpecialities();
                return(View(teacher));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }