/// <summary> /// 获取所有班级(classes)的信息 /// </summary> /// <returns>返回json格式班级信息</returns> public JsonResult Get() { if ((string)Session["Power"] != "1") { return(Json("0")); } return(Json(ClassesDal.List(), JsonRequestBehavior.AllowGet)); }
public JsonResult Del(int id) { if ((string)Session["Power"] != "1") { return(Json("0")); } ClassesDal.Del(id); return(Json(ClassesDal.List())); }
public JsonResult Edit(Classes c) { if ((string)Session["Power"] != "1") { return(Json("0")); } ClassesDal.Edit(c); return(Json(ClassesDal.List())); }
public ActionResult AllClasses() { ViewBag.classes = ClassesDal.List(); return(View()); }