public ActionResult Index() { var model = new LogListViewModel { HasConfigurePermission = _rightService.UserHasRight(Common.LoggedInUser.UserName, Rights.SystemLog, RightOperation.Update), HasExportPermission = _rightService.UserHasRight(Common.LoggedInUser.UserName, Rights.SystemLogExport, RightOperation.Execute) }; return View(model); }
public ContentResult Search(int page, int rows, string sidx, string sord, string filters, string searchField, string searchOper, string searchString) { var model = new LogListViewModel(); var result = new ContentResult() { Content = model.LogsGrid.Search(sidx, sord, page, rows, true, filters, searchField, searchOper, searchString), ContentType = "application/json" }; return result; }
public FileStreamResult Export(string sidx, string sord, string filters) { var model = new LogListViewModel(); Stream fileStream = new MemoryStream(_excelService.GetExcel(model.LogsGrid, "Logs", sidx, sord, filters)); HttpContext.Response.AddHeader("content-disposition", "attachment; filename=logs.xlsx"); return new FileStreamResult(fileStream, "application/ms-excel"); }