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.

78 lines
2.9 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.CashAndVault
  11. {
  12. public partial class ApproveTransferToVaultList : System.Web.UI.Page
  13. {
  14. protected const string GridName = "ApproveVaultTransfer";
  15. private string ViewFunctionId = "20202100";
  16. private const string ApproveFunctionId = "20202110";
  17. private readonly RemittanceLibrary _sl = new RemittanceLibrary();
  18. private readonly SwiftGrid _grid = new SwiftGrid();
  19. protected void Page_Load(object sender, EventArgs e)
  20. {
  21. if (!IsPostBack)
  22. {
  23. GetStatic.PrintMessage(Page);
  24. //Authenticate();
  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. };
  37. _grid.ColumnList = new List<GridColumn>
  38. {
  39. new GridColumn("SN", "SN", "", "T"),
  40. new GridColumn("userName", "User Name", "", "T"),
  41. new GridColumn("TransferredAmount", "Transferred Amount", "", "M"),
  42. new GridColumn("mode", "Transfer Mode", "", "T"),
  43. new GridColumn("toAcc", "To Account", "", "T"),
  44. new GridColumn("isApproved", "Approved Status", "", "T"),
  45. new GridColumn("TransferredDate", "Transferred Date", "", "D"),
  46. };
  47. _grid.GridType = 1;
  48. _grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
  49. _grid.GridName = GridName;
  50. _grid.ShowPagingBar = true;
  51. _grid.AllowApprove = _sl.HasRight(ApproveFunctionId);
  52. _grid.ApproveFunctionId = ApproveFunctionId;
  53. _grid.AlwaysShowFilterForm = false;
  54. _grid.ShowFilterForm = false;
  55. _grid.RowIdField = "rowId";
  56. _grid.ThisPage = "ApproveTransferToVaultList.aspx";
  57. _grid.InputPerRow = 4;
  58. _grid.GridMinWidth = 700;
  59. _grid.GridWidth = 100;
  60. _grid.IsGridWidthInPercent = true;
  61. string sql = "EXEC PROC_VAULTTRANSFER @flag = 's-forAdmin', @branchId=" + _sl.FilterString(GetStatic.GetBranch());
  62. _grid.SetComma();
  63. rpt_grid.InnerHtml = _grid.CreateGrid(sql);
  64. }
  65. protected string GetUserId()
  66. {
  67. return GetStatic.ReadQueryString("userId", "");
  68. }
  69. }
  70. }