You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.8 KiB

  1. using Swift.web.Component.Grid;
  2. using Swift.web.Component.Grid.gridHelper;
  3. using Swift.web.Library;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Web;
  9. using System.Web.UI;
  10. using System.Web.UI.WebControls;
  11. namespace Swift.web.SwiftSystem.ApplicationLog
  12. {
  13. public partial class List : System.Web.UI.Page
  14. {
  15. private const string GridName = "appLogList";
  16. private readonly SwiftGrid _grid = new SwiftGrid();
  17. private readonly SwiftLibrary _sl = new SwiftLibrary();
  18. protected void Page_Load(object sender, EventArgs e)
  19. {
  20. _sl.CheckSession();
  21. if (!IsPostBack)
  22. {
  23. //Authenticate();
  24. GetStatic.PrintMessage(Page);
  25. }
  26. LoadGrid();
  27. }
  28. private void Authenticate()
  29. {
  30. //_sl.CheckAuthentication(ViewFunctionId);
  31. }
  32. private void LoadGrid()
  33. {
  34. _grid.FilterList = new List<GridFilter>
  35. {
  36. new GridFilter("logId", "Log Id:", "LT"),
  37. new GridFilter("createdBy", "User Name:", "LT"),
  38. new GridFilter("createdDate", "Date:", "d"),
  39. };
  40. _grid.ColumnList = new List<GridColumn>
  41. {
  42. new GridColumn("sn", "Sno.", "", "T"),
  43. new GridColumn("id", "Log Id", "", "T"),
  44. new GridColumn("errorPage", "Error Page","", "a"),
  45. new GridColumn("errorMsg", "Error Msg", "", "T"),
  46. new GridColumn("createdBy", "Created By", "", "LT"),
  47. new GridColumn("createdDate", "Created Date", "", "T"),
  48. };
  49. _grid.GridType = 1;
  50. _grid.InputPerRow = 3;
  51. _grid.GridName = GridName;
  52. _grid.ShowFilterForm = true;
  53. _grid.ShowPagingBar = true;
  54. _grid.RowIdField = "id";
  55. _grid.AllowCustomLink = true;
  56. var customLinkText = new StringBuilder();
  57. customLinkText.Append("<a href ='#' onclick=\"ManageLogInfo(@id)\" class=\"btn btn-xs btn-primary\" title=\"View Detail\" data-placement=\"top\" data-toggle=\"tooltip\"><i class=\"fa fa-eye\"></i></a>");
  58. _grid.CustomLinkText = customLinkText.ToString();
  59. _grid.CustomLinkVariables = "id";
  60. string sql = " [proc_ApplicationLogsNew] @flag = 's'";
  61. _grid.SetComma();
  62. rpt_grid.InnerHtml = _grid.CreateGrid(sql);
  63. }
  64. }
  65. }