Example #1
0
        public ActionResult EditClass(string id)                                    // xóa lớp
        {
            if (!user.IsAdmin())
            {
                return(View("Error"));
            }
            int id_class = Convert.ToInt32(id);

            try
            {
                @class cl = Model.GetClass(id_class);
                Model.UpdateLastSeen("Sửa Lớp " + cl.class_name, Url.Action("EditClass/" + id));
                ViewBag.ListSpecialities = Model.GetSpecialities();
                ViewBag.ListGrades       = Model.GetGrades();
                return(View(cl));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }