123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.Log;
- using Bowin.Common.Linq.Entity;
- using EMIS.ViewModel;
- using EMIS.DataLogic.Log;
- using System.Linq.Expressions;
- using EMIS.Entities.Log;
- namespace EMIS.CommonLogic.Log
- {
- public class OperateLogServices : BaseServices, IOperateLogServices
- {
- public OperateLogDAL OperateLogDAL { get; set; }
- public IGridResultSet<OperateLogView> GetOperateLogViewList(ConfiguretView searchCondition, DateTime startTime, DateTime endTime
- , int pageIndex, int pageSize)
- {
- var q = OperateLogDAL.GetOperateLogView(x => (x.OperateTime >= startTime && x.OperateTime <= endTime), x => true);
- if (!string.IsNullOrEmpty(searchCondition.ConditionValue) && !string.IsNullOrEmpty(searchCondition.Attribute))
- q = q.DynamicWhere(searchCondition.Attribute, searchCondition.Condition, searchCondition.ConditionValue);
- return q.OrderByDescending(x => x.OperateTime).ToGridResultSet<OperateLogView>(pageIndex, pageSize);
- }
- public IList<OperateLogView> GetOperateLogViewList(ConfiguretView searchCondition, DateTime startTime, DateTime endTime)
- {
- var q = OperateLogDAL.GetOperateLogView(x => (x.OperateTime >= startTime && x.OperateTime <= endTime), x => true);
- if (!string.IsNullOrEmpty(searchCondition.ConditionValue) && !string.IsNullOrEmpty(searchCondition.Attribute))
- q = q.DynamicWhere(searchCondition.Attribute, searchCondition.Condition, searchCondition.ConditionValue);
- return q.OrderByDescending(x => x.OperateTime).ToList();
- }
- public void Delete(IList<Guid?> logIDList)
- {
- this.LogUnitOfWork.RemoveLogs(logIDList);
- }
- }
- }
|