public JsonResult GetList(int type, JqGridParam jqgridparam) { jqgridparam.rows = jqgridparam.rows < 1 ? 15 : jqgridparam.rows; if (type == 0) { var query = new QueryLoginLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysLoginLog> > >(ServiceConst.LogApi.GetLoginLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else if (type == 1) { var query = new QueryOperationLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysOperationLog> > >(ServiceConst.LogApi.GetOperaterLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else if (type == 2) { var query = new QueryExceptionLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysExceptionLog> > >(ServiceConst.LogApi.GetExceptionLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else { return(Json(string.Empty, JsonRequestBehavior.AllowGet)); } }
public PagedListData <List <SysExceptionLog> > GetListByQuery(QueryExceptionLogModel query) { var model = new PageListModel() { WithColumn = @"[Id] ,[AccessChannelId] ,[UserId] ,[CustomerId] ,[ExceptionDate] ,[ExceptionFunction] ,[ExceptionVersions] ,[ExceptionSource] ,[ExceptionDescription] ,[ExceptionStackTrace] ,[ExceptionType] ,[ExceptionTargetSite] ,[ExceptionTypeName] ,[ExceptionIP] ,[IPNum] ,[ComputerName] ,[ExploreName] ,[ExplorerVersions] ,[SourceEquipment] ,[Enabled] ,[InUser] ,[InDate] ,[DeleteState] ,[DeleteUser] ,[DeleteDate]", WithWhere = " 1=1", LeftColumn = " B.UserName", LeftJoin = " Left join SysUser B on A.UserId =B.Id", }; var pageSearch = new PageSearch() { OrderBy = query.OrderBy, PageIndex = query.PageIndex, PageSize = query.PageSize, Where = query.Where }; return(this.PagedListQuery(model, pageSearch)); }
public ResponseResult <PagedListData <List <SysExceptionLog> > > GetExceptionLogPageList(QueryExceptionLogModel pages) { try { pages.PageSize = pages.PageSize == 0 ? 15 : pages.PageSize; pages.PageIndex = pages.PageIndex < 1 ? 1 : pages.PageIndex; var service = GetService <SysExceptionLogService>(); var result = service.GetListByQuery(pages); return(ResponseResult <PagedListData <List <SysExceptionLog> > > .GenSuccessResponse(result)); } catch (Exception ex) { return(ResponseResult <PagedListData <List <SysExceptionLog> > > .GenFaildResponse(ex.Message)); } }
public PagedListData <List <SysExceptionLog> > GetListByQuery(QueryExceptionLogModel query) { return(this._exceptionTokenRepository.GetListByQuery(query)); }