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.

47 lines
1.4 KiB

  1. using System;
  2. using System.Data;
  3. using Swift.DAL.BL.AgentPanel.Reports;
  4. using Swift.web.Library;
  5. using System.Web.UI.WebControls;
  6. namespace Swift.web.Responsive.Reports.SOADomestic
  7. {
  8. public partial class SoaMonthlySearch : System.Web.UI.Page
  9. {
  10. private readonly RemittanceLibrary _rl = new RemittanceLibrary();
  11. private readonly SOAMonthlyDao _obj = new SOAMonthlyDao();
  12. private const string ViewFunctionId = "40112400";
  13. protected void Page_Load(object sender, EventArgs e)
  14. {
  15. _rl.CheckSession();
  16. if (!IsPostBack)
  17. {
  18. Authenticate();
  19. agent.Text = GetStatic.GetAgentName();
  20. PopulateDdl();
  21. SetCurrentYearMonth();
  22. }
  23. }
  24. private void Authenticate()
  25. {
  26. _rl.CheckAuthentication(ViewFunctionId);
  27. }
  28. private void PopulateDdl()
  29. {
  30. for (var y = 2070; y < 2090; y++)
  31. {
  32. var Year = new ListItem { Value = y.ToString(), Text = y.ToString() };
  33. year.Items.Add(Year);
  34. }
  35. }
  36. private void SetCurrentYearMonth()
  37. {
  38. DataRow dr = _obj.GetNepYrMonth(GetStatic.GetUser());
  39. if (dr == null)
  40. return;
  41. year.SelectedValue = dr["npYear"].ToString();
  42. months.Text = dr["npMonth"].ToString();
  43. }
  44. }
  45. }