1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.SystemView;
- using EMIS.Entities;
- using System.Linq.Expressions;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.TeacherManagement;
- using EMIS.ViewModel.Students;
- namespace EMIS.DataLogic.Common.Students
- {
- public class InSchoolStatusSettingDAL
- {
- public DictionaryItemRepository dictionaryItemView { get; set; }
- public InSchoolSettingRepository inSchoolSettingRepository { get; set; }
-
-
- /// <summary>
- /// 查询字典元素信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<InSchoolStatusView> GetdicViewQueryable(Expression<Func<Sys_DictionaryItem, bool>> exp)
- {
- var query = from a in dictionaryItemView.GetList(exp)
- join b in inSchoolSettingRepository.Entities on a.Value equals b.InSchoolStatusID into gsp
- from gisp in gsp.DefaultIfEmpty()
- select new InSchoolStatusView
- {
- DictionaryItemID = a.DictionaryItemID,
- Code = a.Code,
- DictionaryCode = a.DictionaryCode,
- Value = a.Value,
- Name = a.Name,
- OrderNo = a.OrderNo,
- Sys_RecordStatus = a.RecordStatus,
- IsEditable = a.IsEditable,
- InSchoolSettingID = gisp.InSchoolSettingID,
- InSchoolStatusID = gisp.InSchoolStatusID,
- IsSelected = gisp.IsSelected == true ? true : false,
- RecordStatus = gisp.RecordStatus,
- CreateTime = gisp.CreateTime,
- CreateUserID = gisp.CreateUserID,
- ModifyTime = gisp.ModifyTime,
- ModifyUserID = gisp.ModifyUserID
- };
- return query;
- }
- }
- }
|