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.

75 lines
3.5 KiB

  1. using Swift.DAL.OnlineAgent;
  2. using Swift.web.Component.Grid;
  3. using Swift.web.Component.Grid.gridHelper;
  4. using Swift.web.Library;
  5. using System;
  6. using System.Collections.Generic;
  7. namespace Swift.web.AgentNew.TabletMenu
  8. {
  9. public partial class CustomerPendingList : System.Web.UI.Page
  10. {
  11. private readonly SwiftGrid _grid = new SwiftGrid();
  12. private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
  13. private readonly OnlineCustomerDao _cd = new OnlineCustomerDao();
  14. private const string GridName = "grid_CustomerPendingList";
  15. private readonly SwiftLibrary sl = new SwiftLibrary();
  16. protected void Page_Load(object sender, EventArgs e)
  17. {
  18. sl.CheckSession();
  19. GetStatic.PrintMessage(this);
  20. LoadGrid();
  21. }
  22. private void LoadGrid()
  23. {
  24. _grid.FilterList = new List<GridFilter>
  25. {
  26. new GridFilter("fullName", "Customer Name", "T"),
  27. new GridFilter("fromDate", "Registered From", "d"),
  28. new GridFilter("toDate", "Registered To", "d"),
  29. };
  30. _grid.ColumnList = new List<GridColumn>
  31. {
  32. new GridColumn("SN", "SN", "", "T"),
  33. new GridColumn("FullName", "Customer Name", "", "T"),
  34. new GridColumn("verifyType", "Verify Type", "", "T"),
  35. new GridColumn("verifyValue", "Verify Value", "", "T"),
  36. new GridColumn("country", "Customer Country", "", "T"),
  37. new GridColumn("address", "Customer Address", "", "T"),
  38. new GridColumn("mobile", "Customer Mobile", "", "T"),
  39. new GridColumn("email", "Customer Email", "", "T"),
  40. new GridColumn("createdDate","Created Date","","D"),
  41. };
  42. _grid.GridType = 1;
  43. _grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
  44. _grid.GridName = GridName;
  45. _grid.ShowPagingBar = true;
  46. _grid.ShowAddButton = false;
  47. _grid.AllowEdit = false;
  48. _grid.AllowDelete = false;
  49. _grid.AlwaysShowFilterForm = true;
  50. _grid.ShowFilterForm = true;
  51. _grid.SortOrder = "ASC";
  52. _grid.RowIdField = "customerId";
  53. _grid.ThisPage = "List.aspx";
  54. _grid.InputPerRow = 4;
  55. _grid.GridMinWidth = 700;
  56. _grid.GridWidth = 100;
  57. _grid.IsGridWidthInPercent = true;
  58. _grid.AllowCustomLink = true;
  59. //_grid.AllowApprove = swiftLibrary.HasRight(ApproveFunctionId);
  60. var getCustomerSignatureLink = "<span class=\"action-icon\"> <btn type=\"button\" class=\"btn btn-xs btn-success\" data-toggle=\"tooltip\" data-placement=\"top\" title = \"Print Details\"> <a href =\"javascript:void(0);\" onclick=\"RedirectToVerify('@customerId', '@membershipId', '@idField', '@verifyType')\"><i class=\"fa fa-check\" ></i></a></btn></span>";
  61. _grid.CustomLinkText = getCustomerSignatureLink;
  62. _grid.CustomLinkVariables = "idField,membershipId,customerId,verifyType";
  63. string sql = "EXEC [proc_branch_tablet_menu] @flag = 'al'";
  64. _grid.SetComma();
  65. rpt_grid.InnerHtml = _grid.CreateGrid(sql);
  66. }
  67. }
  68. }