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.5 KiB

  1. using Swift.DAL.BL.Remit.Transaction;
  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. using System.Data;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Web;
  11. using System.Web.UI;
  12. using System.Web.UI.WebControls;
  13. namespace Swift.web.AgentNew.UnpostTransaction
  14. {
  15. public partial class List : System.Web.UI.Page
  16. {
  17. private readonly SwiftGrid _grid = new SwiftGrid();
  18. private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
  19. private const string ViewFunctionIdAgent = "20310000";
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22. Authenticate();
  23. if (!IsPostBack)
  24. {
  25. LoadGrid();
  26. }
  27. }
  28. private void Authenticate()
  29. {
  30. swiftLibrary.CheckAuthentication(ViewFunctionIdAgent);
  31. }
  32. private void LoadGrid()
  33. {
  34. _grid.FilterList = new List<GridFilter>
  35. {
  36. };
  37. _grid.ColumnList = new List<GridColumn>
  38. {
  39. new GridColumn("SN", "SN", "", "T"),
  40. new GridColumn("controlno", "Control No", "", "T"),
  41. new GridColumn("createddate", "UnPost Since", "", "T"),
  42. new GridColumn("paymentmethod", "Payment Method", "", "T"),
  43. new GridColumn("pcountry", "Country", "", "T"),
  44. new GridColumn("pbankname", "Bank Name", "", "T"),
  45. };
  46. _grid.GridType = 1;
  47. _grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
  48. _grid.ShowPagingBar = true;
  49. _grid.AllowEdit = false;
  50. _grid.AlwaysShowFilterForm = false;
  51. _grid.ShowFilterForm = false;
  52. _grid.SortOrder = "ASC";
  53. _grid.RowIdField = "id";
  54. _grid.ThisPage = "List.aspx";
  55. _grid.InputPerRow = 4;
  56. _grid.GridMinWidth = 700;
  57. _grid.GridWidth = 100;
  58. _grid.IsGridWidthInPercent = true;
  59. _grid.CustomLinkVariables = "receiverId,customerId";
  60. string sql = "EXEC [proc_DailyTxnRpt] @flag = 'unPostTransaction'";
  61. _grid.SetComma();
  62. rpt_grid.InnerHtml = _grid.CreateGrid(sql);
  63. }
  64. }
  65. }