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.

58 lines
1.6 KiB

  1. using System;
  2. using Swift.web.Library;
  3. namespace Swift.web.Remit.RiskBaseAnalysis
  4. {
  5. public partial class RBAStatistics : 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. }
  27. protected void sCountry_SelectedIndexChanged(object sender, EventArgs e)
  28. {
  29. if (sCountry.Text != "")
  30. LoadSendingAgent(sCountry.Text);
  31. else
  32. sAgent.Items.Clear();
  33. sCountry.Focus();
  34. }
  35. private void LoadSendingAgent(string countryId)
  36. {
  37. sdd.SetDDL(ref sAgent, "EXEC proc_agentMaster @flag='alc',@agentCountryId='" + countryId + "'", "agentId", "agentName", "", "All");
  38. }
  39. protected void sAgent_SelectedIndexChanged(object sender, EventArgs e)
  40. {
  41. if (sAgent.Text != "")
  42. PopulateBranch(sAgent.Text);
  43. else
  44. sBranch.Items.Clear();
  45. sAgent.Focus();
  46. }
  47. private void Authenticate()
  48. {
  49. sl.CheckAuthentication(ViewFunctionId);
  50. }
  51. protected void PopulateBranch(string agentId)
  52. {
  53. sdd.SetDDL(ref sBranch, "EXEC proc_agentMaster @flag='bl',@parentId='" + agentId + "'", "agentId", "agentName", "", "All");
  54. }
  55. }
  56. }