12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMISOnline.Entities;
- using EMISOnline.DataLogic.Educational;
- using EMISOnline.ViewModel.Educational;
- using Bowin.Common.Linq.Entity;
- using Bowin.Common.Linq;
- using System.Linq.Expressions;
- namespace EMISOnline.CommonLogic.EducationalServices
- {
- public class CourseServices : BaseServices, ICourseServices
- {
- public CourseDAL CourseDAL { get; set; }
- public IGridResultSet<CoursematerView> GetCoursematerList(int pageIndex, int pageSize, string courseName)
- {
- Expression<Func<CoursematerView, bool>> exp = (e => true);
- if (!string.IsNullOrEmpty(courseName))
- {
- exp = exp.And(e => e.CourseName.Contains(courseName.Trim()));
- }
- var list = CourseDAL.GetCoursematerialViewQueryable().Where(exp).OrderByDescending(r => r.CreateTime).ToGridResultSet(pageIndex, pageSize);
- return list;
- }
- }
- }
|