12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories.Log;
- using EMIS.ViewModel.Log;
- using EMIS.Entities.Log;
- using System.Linq.Expressions;
- namespace EMIS.DataLogic.Log
- {
- public class OperateLogDAL
- {
- public OperateRepository OperateRepository { get; set; }
- public VWUserRepository VWUserRepository { get; set; }
- public IQueryable<OperateLogView> GetOperateLogView(Expression<Func<Log_Operate, bool>> exp, Expression<Func<VW_Sys_User, bool>> userExp)
- {
- var q = (from o in OperateRepository.GetList(exp)
- join vu in VWUserRepository.GetList(userExp) on o.UserID equals vu.UserID
- orderby o.OperateTime descending
- select new OperateLogView {
- OperateID = o.OperateID,
- UserID = vu.UserID,
- LoginID = vu.LoginID,
- UserName = vu.Name,
- IP = o.IP,
- TableName = o.TableName,
- SourceUrl = o.SourceUrl,
- Operate = o.Operate,
- Detail = o.Detail,
- IsSuccess = o.IsSuccess,
- IsSuccessDesc = ((o.IsSuccess == true) ? "是" : "否"),
- OperateTime = o.OperateTime
- });
- return q;
- }
- }
- }
|