123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Bowin.Common.Linq;
- using EMIS.CommonLogic.SystemServices;
- using EMIS.Entities;
- using Bowin.Common.Linq.Entity;
- using EMIS.ViewModel.DifferentDynamic;
- using EMIS.ViewModel;
- using EMIS.DataLogic.Common.Students;
- using System.Linq.Expressions;
- namespace EMIS.CommonLogic.Students
- {
- public class ReentryServices : BaseWorkflowServices<CF_DifferentDynamic>, IReentryServices
- {
- public DifferentDynamicDAL DifferentDynamicDAL { get; set; }
- public IGridResultSet<StudentReentryView> GetStudentReentryViewGrid(ConfiguretView configuretView, Guid? returnSchoolyearID, Guid? campusID, Guid? collegeID,
- int? education, int? year, int? standard, int? learningform, int pageIndex, int pageSize)
- {
- var endStatusID = this.GetCorrectEndStatus();
- Expression<Func<CF_DifferentDynamic, bool>> filter = (x => true);
- Expression<Func<CF_College, bool>> collegeFilter = (x => true);
- Expression<Func<CF_Facultymajor, bool>> facultyFilter = (x => true);
- Expression<Func<CF_Grademajor, bool>> gradeFilter = (x => true);
- if (returnSchoolyearID.HasValue)
- {
- filter = filter.And(x => x.ReturnSchoolyearID == returnSchoolyearID);
- }
- if (campusID.HasValue)
- {
- collegeFilter = collegeFilter.And(x => x.CampusID == campusID);
- }
- if (collegeID.HasValue)
- {
- collegeFilter = collegeFilter.And(x => x.CollegeID == collegeID);
- }
- if (education.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.EducationID == education);
- }
- if (year.HasValue)
- {
- gradeFilter = gradeFilter.And(x => x.GradeID == year);
- }
- if (standard.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.StandardID == standard);
- }
- if (learningform.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.LearningformID == learningform);
- }
- var query = DifferentDynamicDAL.GetNeedReturnList(filter, endStatusID.Value, gradeFilter, facultyFilter, collegeFilter);
- query = GetQueryByDataRangeByCollege(query);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- query = query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue);
- query = query.OrderByDescending(w => w.CreateTime);
- var result = query.ToGridResultSet(pageIndex, pageSize);
- return result;
- }
- public List<StudentReentryView> GetStudentReentryViewList(ConfiguretView configuretView, Guid? returnSchoolyearID, Guid? campusID, Guid? collegeID,
- int? education, int? year, int? standard, int? learningform)
- {
- var endStatusID = this.GetCorrectEndStatus();
- Expression<Func<CF_DifferentDynamic, bool>> filter = (x => true);
- Expression<Func<CF_College, bool>> collegeFilter = (x => true);
- Expression<Func<CF_Facultymajor, bool>> facultyFilter = (x => true);
- Expression<Func<CF_Grademajor, bool>> gradeFilter = (x => true);
- if (returnSchoolyearID.HasValue)
- {
- filter = filter.And(x => x.ReturnSchoolyearID == returnSchoolyearID);
- }
- if (campusID.HasValue)
- {
- collegeFilter = collegeFilter.And(x => x.CampusID == campusID);
- }
- if (collegeID.HasValue)
- {
- collegeFilter = collegeFilter.And(x => x.CollegeID == collegeID);
- }
- if (education.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.EducationID == education);
- }
- if (year.HasValue)
- {
- gradeFilter = gradeFilter.And(x => x.GradeID == year);
- }
- if (standard.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.StandardID == standard);
- }
- if (learningform.HasValue)
- {
- facultyFilter = facultyFilter.And(x => x.LearningformID == learningform);
- }
- var query = DifferentDynamicDAL.GetNeedReturnList(filter, endStatusID.Value, gradeFilter, facultyFilter, collegeFilter);
- query = GetQueryByDataRangeByCollege(query);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- query = query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue);
- query = query.OrderByDescending(w => w.CreateTime);
- var result = query.ToList();
- return result;
- }
- }
- }
|