/// <summary> /// 按条件查询试听课 /// </summary> /// <returns></returns> public ActionResult STClassList() { AjaxStatusModel ajax = new AjaxStatusModel(); ajax.status = EnumAjaxStatus.Error; //默认失败 ajax.msg = "获取失败!"; //前台获取,用于显示提示信息 ClassesListSearchModel search = new ClassesListSearchModel(); string CourseName = Request["CourseName"]; string StartTime_start = Request["StartTime_start"]; string StartTime_end = Request["StartTime_end"]; string islisten = Request["islisten"];//是否查询试听列表 search.ComCode = UserSession.comcode; search.CourseName = CourseName; if (!string.IsNullOrEmpty(StartTime_start)) { search.StartTime_start = StartTime_start; } if (!string.IsNullOrEmpty(StartTime_end)) { search.StartTime_end = StartTime_end; } search.CurrentPage = 1; //当前页 search.PageSize = 99999; //不想分页就设置成一个较大的值 search.islisten = islisten; List <vw_Classes> vw_Classes = ClassesData.GeClassesList(search); ajax.data = vw_Classes; return(Json(new { total = 1, rows = vw_Classes, state = true, msg = "加载成功" }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 班级列表查询 /// </summary> public ActionResult Classes(ClassesListSearchModel search) { ClassesListViewModel model = new ClassesListViewModel(); //页面模型 model.search = search; //页面的搜索模型 model.search.PageSize = 15; //每页显示 model.search.CurrentPage = Convert.ToInt32(Request["pageindex"]) <= 0 ? 1 : Convert.ToInt32(Request["pageindex"]); //当前页 //下拉项 List <CommonEntity> SourceIL = CommonData.GetDictionaryList(5);//授课方式 model.SourceIL = CommonData.Instance.GetBropDownListData(SourceIL); //下拉项 List <CommonEntity> SourceIL1 = CommonData.GetCourseList();//课程 model.SourceIL1 = CommonData.Instance.GetBropDownListData(SourceIL1); //下拉项 List <CommonEntity> SourceIL2 = CommonData.GetTeachersList();//获取老师信息 model.SourceIL2 = CommonData.Instance.GetBropDownListData(SourceIL2); //下拉项 List <CommonEntity> SourceIL3 = CommonData.GetDictionaryList(11);//获取教室信息 model.SourceIL3 = CommonData.Instance.GetBropDownListData(SourceIL3); //下拉项 List <CommonEntity> SourceIL4 = CommonData.GetDictionaryList(8);//获取上课的时段信息 model.SourceIL4 = CommonData.Instance.GetBropDownListData(SourceIL4); //获取升级班级列表下拉框,只能是未排课的班级列表 List <CommonEntity> UpgradeClassesIL = CommonData.GetClassesItemList(); model.UpgradeClassesIL = CommonData.Instance.GetBropDownListData(UpgradeClassesIL); //分校下拉项 List <CommonEntity> ComCodeIL = CommonData.Get_SYS_Company_COMP_Code(UserSession.comcode);//分校 model.ComCodeIL = CommonData.Instance.GetBropDownListData_Choice(ComCodeIL); model.search.ComCodeIL = CommonData.Instance.GetBropDownListData_Choice(ComCodeIL); if (UserSession.comcode != null && UserSession.comcode != "1") { search.ComCode = UserSession.comcode;//默认查询当前分校的人员 } model.Classeslist = ClassesData.GeClassesList(search); //填充页面模型数据 return(View(model)); //返回页面模型 }