123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using EMIS.ViewModel.Log;
- using Bowin.Common.Linq.Entity;
- using EMIS.ViewModel;
- using EMIS.DataLogic.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);
- }
- }
- }
|