Beispiel #1
0
        /// <summary>
        /// 获取所有班级(classes)的信息
        /// </summary>
        /// <returns>返回json格式班级信息</returns>
        public JsonResult Get()
        {
            if ((string)Session["Power"] != "1")
            {
                return(Json("0"));
            }

            return(Json(ClassesDal.List(), JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult Del(int id)
        {
            if ((string)Session["Power"] != "1")
            {
                return(Json("0"));
            }

            ClassesDal.Del(id);
            return(Json(ClassesDal.List()));
        }
Beispiel #3
0
        public JsonResult Edit(Classes c)
        {
            if ((string)Session["Power"] != "1")
            {
                return(Json("0"));
            }

            ClassesDal.Edit(c);
            return(Json(ClassesDal.List()));
        }
Beispiel #4
0
 public ActionResult AllClasses()
 {
     ViewBag.classes = ClassesDal.List();
     return(View());
 }