public JsonResult GetLessonLog(int courseid, DtoSearch search) { LessonBll bll = new LessonBll(); var list = bll.GetLessonLogByPage(courseid, search); return(Json(AbhsTableFactory.Create(list, search.Pagination.TotalCount))); }
public ActionResult GetPagingAdvertisingHistory(AdvertisingSearch search) { var list = new AdvertisingBll().GetPagingAdvertisingHistory(search.Pagination, search.AdvPosId); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public JsonResult GetApproveLessons(DtoApproveLessonSearch search) { LessonBll bll = new LessonBll(); List <DtoLessonApprove> list = bll.GetLessonApproveByPage(search); return(Json(AbhsTableFactory.Create(list, search.Pagination.TotalCount))); }
private JsonResult Table <T>(IEnumerable <T> data, int totalRecord) where T : class, new() { var result = AbhsTableFactory.Create(data, totalRecord); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult GetClassList(DtoSchoolClassSearch search) { var list = schoolClassBll.GetSchoolClassList(search); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetCashVoucheres(CashVoucherSearch search) { CashVoucherBll cashVoucherBll = new CashVoucherBll(); var viewModels = cashVoucherBll.GetPagingCashVoucherForSchool(search.Pagination, search.Id, search.Name, search.Status, search.SchoolId); var table = AbhsTableFactory.Create(viewModels, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetSchoolLevel() { var list = schoolBll.GetSchoolLevelList(); int count = list == null ? 0 : list.Count; var table = AbhsTableFactory.Create(list, count); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetStudentCashVoucheres(CahsVoucherDetailsSearch search) { CashVoucherBll cashVoucherBll = new CashVoucherBll(); var viewModels = cashVoucherBll.GetPagingStudentCashVoucher(search.Pagination, search.CashVoucherId, search.Status, search.UsedReferNo); var table = AbhsTableFactory.Create(viewModels, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 多媒体资源列表 /// </summary> /// <param name="search"></param> /// <returns></returns> public ActionResult GetSubjectToCourse(ResourceToCourseSearch search) { ResourceBll resourceBll = new ResourceBll(); var viewModels = resourceBll.GetSubjectToCourse(search.Pagination, search.CourseId, search.SubjectType, search.NameOrKey); var table = AbhsTableFactory.Create(viewModels, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetKnowledges(KnowledgeSearch search) { KnowledgeBll knowledgeBll = new KnowledgeBll(); var list = knowledgeBll.GetPagingKnowledge(search.Pagination, search.Id, search.NameOrKey, search.KnowledgeType); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPrologueList(int pageIndex, int pageSize) { ResourceBll resourceBll = new ResourceBll(); PagingObject paging = new PagingObject(pageIndex, pageSize); var viewModels = resourceBll.GetXiaoAiBianOrPrologue(paging, (int)MediaResourceTypeEnum.开场语); var table = AbhsTableFactory.Create(viewModels, paging.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetResourceGroupItem(ResourceGroupItemSearch search) { ResourceBll resourceBll = new ResourceBll(); PagingObject paging = new PagingObject(search.PageIndex, search.PageSize); var viewModels = resourceBll.GetResourceGroupItem(paging, search.Id, search.ResourceType); var table = AbhsTableFactory.Create(viewModels, paging.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetResourceGroups(ResourceSearch search) { ResourceBll resourceBll = new ResourceBll(); var resourceList = resourceBll.GetPagingResourceGroup(search.Pagination, search.Id, search.Name, search.Grade, search.GroupType); var viewModels = resourceList.ConvertTo <List <ResourceGroupViewModel> >(); var table = AbhsTableFactory.Create(viewModels, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPagingMediaResource(ResourceSearch search) { ResourceBll resourceBll = new ResourceBll(); var resourceList = resourceBll.GetPagingMediaResource(search.Pagination, search.Id, search.NameOrKey, search.Grade, search.MediaType); List <MediaResourceViewModel> list = resourceList.ConvertTo <List <MediaResourceViewModel> >(); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetStudentLogin(int pageIndex, int pageSize) { StudentInfoBll studentInfoBll = new StudentInfoBll(); PagingObject paging = new PagingObject(pageIndex, pageSize); var studentLogins = studentInfoBll.GetStudentLogin(paging, GetCurrentUser().StudentId); var viewModels = studentLogins.ConvertTo <List <StudentLoginViewModel> >(Code.Json.PropertyNamePrefixAction.Remove); var table = AbhsTableFactory.Create <StudentLoginViewModel>(viewModels, paging.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetStudyTasks(DtoStudyTaskSearch search) { search.StudentId = GetCurrentUser().StudentId; search.TaskType = StudyTaskTypeEnum.系统课后任务; StudentPracticeBll bll = new StudentPracticeBll(); var entities = bll.GetStudyTasks(search); var list = entities.ConvertTo <IList <StudyTaskListViewModel> >(); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public JsonResult GetCurriculums(DtoCurriculumSearch search) { CourseBll bll = new CourseBll(); IList <DtoCourseListItem> entities = bll.GetCourses(search); PropertyNamePrefixAction action = PropertyNamePrefixAction.Remove; IEnumerable <CourseViewModel> list = entities.Select(s => s.ConvertTo <CourseViewModel>(action)); return(Json(AbhsTableFactory.Create(list, search.Pagination.TotalCount))); }
public ActionResult GetCoursesAttended(DtoCoursesSearch search) { search.StudentId = GetCurrentUser().StudentId; StudentStudyBll bll = new StudentStudyBll(); IList <StudentPractice.DtoCourse> courses = bll.GetCoursesAttended(search); var result = courses.ConvertTo <IList <CourseListItemVm> >(); var table = AbhsTableFactory.Create(result, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public JsonResult GetQuestions(DtoQuestionSearch search) { //此处只需要合格状态的数据 search.SubjectStatus = SubjectStatusEnum.合格; SubjectBll bll = new SubjectBll(); IList <Yw_Subject> subjects = bll.GetSubjects(search); IEnumerable <SubjectViewModel> list = subjects.Select(s => SubjectViewModel.Create(s)); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public JsonResult GetMyQuestions(DtoQuestionSearch search) { //if (!search.SubjectStatus.HasValue || (int)search.SubjectStatus.Value == 0) //{ // search.SubjectStatus= SubjectStatusEnum. //} SubjectBll bll = new SubjectBll(); IList <Yw_Subject> subjects = bll.GetSubjects(search); IEnumerable <SubjectViewModel> list = subjects.Select(s => SubjectViewModel.Create(s)); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetEmployees(EmployeeSearch employeeSearch) { try { List <DtoEmployee> employeeList = employeeBll.GetPagingEmployee(employeeSearch.Pagination, employeeSearch.AccountOrNameOrPhone, employeeSearch.Role, employeeSearch.Status); var table = AbhsTableFactory.Create(employeeList, employeeSearch.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new JsonSimpleResponse() { State = false, ErrorMsg = ex.Message })); } }
public ActionResult GetNoClassList(DtoSchoolNoClassStudentSearch search) { var list = studentStudyBll.GetNoClassStudent(search); list.ForEach(s => { if (s.Bst_Phone.HasValue() && s.Bst_Phone.Length == 11) { var tmp = s.Bst_Phone.Substring(0, 4) + "****" + s.Bst_Phone.Substring(7, 4); s.Bst_Phone = tmp; } }); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetApplyList(DtoApplyStudentSearch search) { var list = studentApplyBll.GetToDoApplyList(search); list.ForEach(s => { if (!s.Bst_Phone.HasValue() || s.Bst_Phone.Length < 11) { s.Bst_PhoneShow = ""; } else { var tmp = s.Bst_Phone.Substring(0, 4) + "****" + s.Bst_Phone.Substring(7, 4); s.Bst_PhoneShow = tmp; } s.Bst_Phone = ""; }); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult GetGroupedSubjects(DtoQuestionSearch search) { var subjectGroup = new SubjectGroupBll().GetBySubjectId(search.Id); IList <SubjectViewModel> list = new List <SubjectViewModel>(); if (subjectGroup != null && !string.IsNullOrWhiteSpace(subjectGroup.Ysg_RelSubjectId)) { var ids = subjectGroup.Ysg_RelSubjectId.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => int.Parse(s)); SubjectBll bll = new SubjectBll(); var subjects = bll.GetSubjectsByIds(ids); if (subjects != null && subjects.Count > 0) { list = subjects.Select(s => SubjectViewModel.Create(s)).ToList(); } } var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public ActionResult WrongBookList(DtoStudentWrongSearch search) { StudentWrongBookBll wrongBookBll = new StudentWrongBookBll(); search.StudentId = GetCurrentUser().StudentId; var list = wrongBookBll.GetBookList(search); #region 错误传pageinde处理 if ((list == null || list.Count == 0) && search.Pagination.PageIndex > 1 && search.Pagination.TotalCount > 0) { search.Pagination.PageIndex = 1; list = wrongBookBll.GetBookList(search); } #endregion #region testdata //list = new List<DtoStudentWrongBookInfo>(); //for (int i = 0; i < 2; i++) //{ // list.Add(new DtoStudentWrongBookInfo() // { // CourseLessonName = "CourseLessonName", // CourseName = "CourseName", // Ywb_Id = 1, // Yws_CreateTime = DateTime.Now, // Yws_Source = i % 4 == 0 ? 1 : i % 4, // Yws_Status = i % 2 == 0 ? 1 : 2, // Yws_RemoveCount = 1, // Yws_WrongCount = 3, // Yws_WrongKnowledgeCount = 1, // }); //} //search.Pagination.TotalCount = 20; #endregion var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }