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

  1. using System;
  2. using System.Web.UI.WebControls;
  3. using Swift.web.Library;
  4. namespace Swift.web.Remit.RiskBaseAnalysis
  5. {
  6. public partial class RBAReportMex : System.Web.UI.Page
  7. {
  8. private readonly StaticDataDdl sdd = new StaticDataDdl();
  9. private readonly SwiftLibrary sl = new SwiftLibrary();
  10. private const string ViewFunctionId = "20163400";
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. sl.CheckSession();
  14. if (!IsPostBack)
  15. {
  16. Authenticate();
  17. PopulateDdl();
  18. fromDate.Text = DateTime.Now.ToString("MM/dd/yyyy");
  19. toDate.Text = DateTime.Now.ToString("MM/dd/yyyy");
  20. }
  21. GetStatic.ResizeFrame(Page);
  22. }
  23. private void PopulateDdl()
  24. {
  25. sdd.SetDDL2(ref sNativeCountry, "EXEC proc_countryMaster 'l'", "countryName", "", "All");
  26. sdd.SetExchangeDDL(ref sBranch, "EXEC proc_ExchangeDropdown @FLAG='branchList', @user = " + sdd.FilterString(GetStatic.GetUser()), "COMPANY_ID", "BRANCH_NAME", "", "All Branch");
  27. }
  28. private void Authenticate()
  29. {
  30. sl.CheckAuthentication(ViewFunctionId);
  31. }
  32. protected void reportFor_SelectedIndexChanged(object sender, EventArgs e)
  33. {
  34. switch (reportFor.Text.ToUpper())
  35. {
  36. case "TXN RBA":
  37. trSendingBranch.Visible = true;
  38. trTxnCount.Visible = false;
  39. trCurrencyCount.Visible = false;
  40. trOutletCount.Visible = false;
  41. rptType.Items.Add(new ListItem("Summary Report-Branch", "Summary Report-Branch"));
  42. break;
  43. case "TXN AVERAGE RBA":
  44. trSendingBranch.Visible = false;
  45. trTxnCount.Visible = true;
  46. trCurrencyCount.Visible = true;
  47. trOutletCount.Visible = true;
  48. rptType.Items.Remove(new ListItem("Summary Report-Branch", "Summary Report-Branch"));
  49. break;
  50. case "PERIODIC RBA":
  51. trSendingBranch.Visible = false;
  52. trTxnCount.Visible = true;
  53. trCurrencyCount.Visible = true;
  54. trOutletCount.Visible = true;
  55. rptType.Items.Remove(new ListItem("Summary Report-Branch", "Summary Report-Branch"));
  56. break;
  57. case "FINAL RBA":
  58. trSendingBranch.Visible = false;
  59. trTxnCount.Visible = true;
  60. trCurrencyCount.Visible = true;
  61. trOutletCount.Visible = true;
  62. rptType.Items.Remove(new ListItem("Summary Report-Branch", "Summary Report-Branch"));
  63. break;
  64. }
  65. }
  66. }
  67. }