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.

82 lines
3.2 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.Web;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. namespace Swift.web.Remit.AddCutomer_sReceiver
  11. {
  12. public partial class List : System.Web.UI.Page
  13. {
  14. private const string ViewFunctionId = "2019300";
  15. private const string AddEditFunctionId = "2019310";
  16. private readonly RemittanceLibrary remLibrary = new RemittanceLibrary();
  17. private readonly SwiftGrid grid = new SwiftGrid();
  18. protected void Page_Load(object sender, EventArgs e)
  19. {
  20. if (!IsPostBack)
  21. {
  22. GetStatic.PrintMessage(this);
  23. }
  24. LoadGrid();
  25. }
  26. private void Authenticate()
  27. {
  28. remLibrary.CheckAuthentication(ViewFunctionId);
  29. }
  30. private void LoadGrid()
  31. {
  32. grid.FilterList = new List<GridFilter>
  33. {
  34. new GridFilter("firstName", "Full Name", "T"),
  35. new GridFilter("country", "Country Name", "T"),
  36. new GridFilter("address", "Address", "T")
  37. };
  38. grid.ColumnList = new List<GridColumn>
  39. {
  40. new GridColumn("customerId", "Customer ID", "", "T"),
  41. new GridColumn("firstName", "Full Name", "", "T"),
  42. new GridColumn("country", "Country", "", "T"),
  43. new GridColumn("state", "State", "", "T"),
  44. new GridColumn("address", "Address", "", "T"),
  45. new GridColumn("city", "City", "", "T"),
  46. new GridColumn("email", "Email", "", "T"),
  47. new GridColumn("Mobile", "Mobile", "", "T"),
  48. new GridColumn("workPhone", "WorkPhone", "", "T"),
  49. new GridColumn("relationship", "Relationship", "", "T")
  50. };
  51. var allowAddEdit = true;
  52. grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
  53. grid.GridName = "newBankAdd";
  54. grid.GridType = 1;
  55. grid.ShowAddButton = allowAddEdit;
  56. grid.ShowFilterForm = true;
  57. grid.ShowPagingBar = true;
  58. grid.AddButtonTitleText = "Add New ";
  59. grid.RowIdField = "receiverId";
  60. grid.AddPage = "Manage.aspx";
  61. grid.InputPerRow = 4;
  62. grid.InputLabelOnLeftSide = true;
  63. // grid.ApproveFunctionId = true;
  64. //grid.AllowApprove = true;
  65. grid.AlwaysShowFilterForm = true;
  66. grid.AllowEdit = allowAddEdit;
  67. grid.DisableSorting = true;
  68. string sql = "[proc_online_receiverSetup] @Flag = 's'";
  69. grid.SetComma();
  70. rptGrid.InnerHtml = grid.CreateGrid(sql);
  71. }
  72. }
  73. }