public ContentResult Search(int page, int rows, string sidx, string sord, string filters, string searchField, string searchOper, string searchString) { var model = new ClassroomTypeListViewModel(); ContentResult result = new ContentResult() { Content = model.ClassroomTypeListGrid.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 ClassroomTypeListViewModel(); Stream fileStream = new MemoryStream(_excelService.GetExcel(model.ClassroomTypeListGrid, "ClassroomType", sidx, sord, filters)); HttpContext.Response.AddHeader("content-disposition", "attachment; filename=ClassroomType.xlsx"); return new FileStreamResult(fileStream, "application/ms-excel"); }