1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Linq.Expressions;
- using EMISOnline.Entities;
- using EMISOnline.DataLogic.Educational;
- using Bowin.Common.Linq.Entity;
- using EMISOnline.ViewModel.Educational;
- using Bowin.Common.Linq;
- namespace EMISOnline.CommonLogic.EducationalServices
- {
- public class CollegeServices : BaseServices, ICollegeServices
- {
- public CollegeDAL CollegeDAL { get; set; }
- public IGridResultSet<CollegeView> GetCollegeList(int pageIndex, int pageSize, string collegeName, string collegeNo)
- {
- Expression<Func<CF_College, bool>> exp = (x => true);
- if (!string.IsNullOrEmpty(collegeName))
- {
- exp = exp.And(e => e.Name.Contains(collegeName.Trim()));
- }
- if (!string.IsNullOrEmpty(collegeNo))
- {
- exp = exp.And(e => e.No.Contains(collegeNo.Trim()));
- }
- var list = CollegeDAL.GetCollegeList(exp).OrderByDescending(r => r.CreateTime).ToGridResultSet(pageIndex, pageSize);
- return list;
- }
- }
- }
|