Example #1
0
        /// <summary>
        /// 查询系统用户列表执行方法
        /// </summary>
        /// <param name="request">
        /// 数据源请求信息对象
        /// </param>
        /// <returns>
        /// 执行方法结果
        /// </returns>
        public ActionResult QueryLog([DataSourceRequest] DataSourceRequest request)
        {
            this.systemLogService = new SystemLogService();

            int pageCount;
            int totalCount;

            if (request.Page <= 0)
            {
                request.Page = 1;
            }

            var paging = new Paging("[System_Log]", null, "ID", null, request.Page, request.PageSize);

            var list = this.systemLogService.Query(paging, out pageCount, out totalCount);
            if (list == null)
            {
                return this.View();
            }

            var modelList = new List<System_Log>();
            foreach (var systemRole in list)
            {
                modelList.Add(DataTransfer.Transfer<System_Log>(systemRole, typeof(System_Log)));
            }

            var result = new DataSourceResult { Data = modelList, Total = totalCount };
            return this.Json(result, JsonRequestBehavior.AllowGet);
        }
Example #2
0
 public ActionResult RemoveLog(int ID)
 {
     try
     {
         this.systemLogService = new SystemLogService();
         this.systemLogService.RemoveByID(ID);
         return this.RedirectToAction("Index");
     }
     catch (Exception exception)
     {
         throw new Exception(exception.Message, exception);
     }
 }