Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Layout = null;
  2.  
  3. var rows = 1;
  4.  
  5. if (ViewBag.TotalRows > 0)
  6. {
  7. rows = ViewBag.TotalRows;
  8. }
  9.  
  10.  
  11. var grid = new WebGrid(canPage: true, rowsPerPage: 10,
  12. ajaxUpdateContainerId: "gridDriveCost");
  13. grid.Bind(source: Model, rowCount: rows);
  14. }
  15.  
  16. @grid.GetHtml(tableStyle: "gTable",
  17. headerStyle: "header",
  18. alternatingRowStyle: "alt",
  19. selectedRowStyle: "select",
  20. footerStyle: "table-pager",
  21. columns: new[] {
  22. grid.Column(format: (item) => item)
  23. }
  24. )
  25.  
  26. </div>
  27.  
  28. if (!string.IsNullOrEmpty(search) || pin>0 || (!string.IsNullOrEmpty(dateFrom) && !string.IsNullOrEmpty(dateTo)))
  29. {
  30. var dc = new DC();
  31. List<string> dcGrid = dc.GetDriveCostFilter(search,pin,dateFrom,dateTo);
  32. dcGrid.Sort(0, 0, null);
  33. result = dcGrid;
  34.  
  35.  
  36. ViewBag.TotalRows = result.Count();
  37. }
  38.  
  39. return PartialView(gView,result.ToList());
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement