예제 #1
0
        /// <summary>
        /// 操作日志查询
        /// </summary>
        /// <param name="logType">日志类型</param>
        /// <param name="model">模块</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="pageSzie"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public PageJqDatagrid <ComOperationLogEntity> GetCommonQuryGetCommonQury(int logType, string startTime, string endTime, int pageSzie = 15,
                                                                                 int pageIndex = 1)
        {
            //计时
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            int totalRecords;

            var data = new ComOperationLogDal().GetCommonQury(logType, startTime, endTime, pageSzie, pageIndex, out totalRecords);

            var list = ConvertListHelper <ComOperationLogEntity> .ConvertToList(data);

            stopwatch.Stop();
            var totalPage = (totalRecords + pageSzie - 1) / pageSzie;   //计算页数

            return(new PageJqDatagrid <ComOperationLogEntity>
            {
                page = pageIndex,
                rows = list,
                total = totalPage,
                records = totalRecords,
                costtime = stopwatch.ElapsedMilliseconds.ToString()
            });
        }
예제 #2
0
 public ComOperationLogBll()
 {
     BaseDal = new ComOperationLogDal();
 }