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.

60 lines
2.2 KiB

  1. using System;
  2. using Swift.web.Library;
  3. namespace Swift.web.Remit.RiskBaseAnalysis
  4. {
  5. public partial class RBATxnRpt : System.Web.UI.Page
  6. {
  7. private readonly StaticDataDdl sdd = new StaticDataDdl();
  8. private readonly SwiftLibrary sl = new SwiftLibrary();
  9. private const string ViewFunctionId = "20191700";
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. sl.CheckSession();
  13. if (!IsPostBack)
  14. {
  15. Authenticate();
  16. PopulateDdl();
  17. fromDate.Text = DateTime.Now.ToString("MM/dd/yyyy");
  18. toDate.Text = DateTime.Now.ToString("MM/dd/yyyy");
  19. }
  20. GetStatic.ResizeFrame(Page);
  21. }
  22. private void PopulateDdl()
  23. {
  24. sdd.SetDDL(ref sCountry, "EXEC proc_countryMaster 'scl'", "countryId", "countryName", "133" , "Select");
  25. LoadSendingAgent("133");
  26. sdd.SetDDL2(ref rCountry, "EXEC proc_countryMaster 'rcl'", "countryName", "", "All");
  27. sdd.SetDDL2(ref sNativeCountry, "EXEC proc_countryMaster 'l'", "countryName", "", "All");
  28. }
  29. protected void sCountry_SelectedIndexChanged(object sender, EventArgs e)
  30. {
  31. if (sCountry.Text != "")
  32. LoadSendingAgent(sCountry.Text);
  33. else
  34. sAgent.Items.Clear();
  35. sCountry.Focus();
  36. }
  37. private void LoadSendingAgent(string countryId)
  38. {
  39. sdd.SetDDL(ref sAgent, "EXEC proc_agentMaster @flag='alc',@agentCountryId='" + countryId + "'", "agentId", "agentName", "", "All");
  40. }
  41. protected void sAgent_SelectedIndexChanged(object sender, EventArgs e)
  42. {
  43. if (sAgent.Text != "")
  44. PopulateBranch(sAgent.Text);
  45. else
  46. sBranch.Items.Clear();
  47. sAgent.Focus();
  48. }
  49. private void Authenticate()
  50. {
  51. sl.CheckAuthentication(ViewFunctionId);
  52. }
  53. protected void PopulateBranch(string agentId)
  54. {
  55. sdd.SetDDL(ref sBranch, "EXEC proc_agentMaster @flag='bl',@parentId='" + agentId + "'", "agentId", "agentName", "", "All");
  56. }
  57. }
  58. }