public ActionResult LibrayManagentDelete(IEnumerable <LibrayManagent> adminDatas) { ILibrayManagentDAL dal = new LibrayManagetnDal(ConfigurationManager.AppSettings["assembly"]); ILibrayDeleteDatabase update = new DeleteDatas(); bool isUpdate = update.LibrayDelete(adminDatas, dal); if (isUpdate) { IGetEntity get = new GetEntity(); ILibrayManagentDAL sc = new LibrayManagetnDal(ConfigurationManager.AppSettings["assembly"]); LibrayManagent adminTable = new LibrayManagent(); var jsonData = get.GetEntitys(x => true, sc).ToList(); //将对象序列化为JSON格式 var json = CreateJson(jsonData); return(Json(json, JsonRequestBehavior.AllowGet)); } return(new HttpStatusCodeResult(404, "无法保存")); }
public ActionResult StuStatusDeleteAdmin(IEnumerable <StudentDetialData> adminDatas) { IStudentDetialDataDal dal = new StudentDetialDatasDal(ConfigurationManager.AppSettings["assembly"]); IStudentDetialDelete delete = new DeleteDatas(); bool isUpdate = delete.LibrayDelete(adminDatas, dal); if (isUpdate) { IGetEntity get = new GetEntity(); List <StudentDetialData> list = new List <StudentDetialData>(); list = dal.GetEntityForExpress(x => true).ToList(); //序列化为JSON数据 var json = CreateJson(list); return(Json( json, JsonRequestBehavior.AllowGet)); } return(new HttpStatusCodeResult(404, "无法保存")); }