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.

63 lines
1.9 KiB

  1. using Swift.DAL.BL.Remit.Compliance;
  2. using Swift.web.Library;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  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.Remit.Compliance.OfacReleaseRpt
  12. {
  13. public partial class MoreMatches : System.Web.UI.Page
  14. {
  15. complianceDao cd = new complianceDao();
  16. private readonly SwiftLibrary sl = new SwiftLibrary();
  17. protected void Page_Load(object sender, EventArgs e)
  18. {
  19. sl.CheckSession();
  20. PopulateMoreMatches();
  21. }
  22. private void PopulateMoreMatches()
  23. {
  24. DataTable response = cd.GetMoreMatches(GetTranId());
  25. if (response == null)
  26. {
  27. return;
  28. }
  29. if (response.Rows[0]["isJsonData"].ToString() == "Y")
  30. {
  31. string res = GetStatic.ParseOfacJson(response.Rows[0]["ofacRemarks"].ToString(), "");
  32. if (!string.IsNullOrEmpty(res))
  33. {
  34. txnDetails.InnerHtml = res;
  35. }
  36. return;
  37. }
  38. var str = new StringBuilder("<table class=\"table table-bordered\">");
  39. str.AppendLine("<tr><th align=\"left\">S. No.</th><th align=\"left\">OFAC Remarks</th></tr>");
  40. var sn = 1;
  41. foreach (DataRow dr in response.Rows)
  42. {
  43. str.Append("<tr>");
  44. str.Append("<td>" + sn + "</td>");
  45. str.Append("<td>" + dr[1].ToString() + "</td>");
  46. str.Append("</tr>");
  47. sn++;
  48. }
  49. str.AppendLine("</table>");
  50. txnDetails.InnerHtml = str.ToString();
  51. }
  52. public string GetTranId()
  53. {
  54. return GetStatic.ReadQueryString("tranId", "");
  55. }
  56. }
  57. }