// GET: Class
 public ActionResult AddCLass()
 {
     ViewBag.ListGroups   = GroupActions.listGroups();
     ViewBag.ListTeachers = TeacherActions.listTeachers();
     ViewBag.ListClasses  = ClassActions.listClasses();
     return(View());
 }
        public ActionResult EditClass(int id)
        {
            var classbyid = ClassActions.findClassByID(id);

            ViewBag.Class        = classbyid;
            ViewBag.ListGroups   = GroupActions.listGroups();
            ViewBag.ListTeachers = TeacherActions.listTeachers();
            return(View(classbyid));
        }
        public ActionResult ListTeacher()
        {
            if (Session["username"] != null)
            {
                ViewBag.ListTeacher = TeacherActions.listTeachers();
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }

            return(View());
        }