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.

55 lines
1.6 KiB

  1. using Swift.DAL.ExchangeSystem.LedgerSetup;
  2. using Swift.web.Library;
  3. using System;
  4. using System.Data;
  5. using System.Text;
  6. namespace Swift.web.include
  7. {
  8. public partial class SearchLedger : System.Web.UI.Page
  9. {
  10. private LedgerDao _obj = new LedgerDao();
  11. private readonly SwiftLibrary _sl = new SwiftLibrary();
  12. private StringBuilder _str = new StringBuilder();
  13. protected void Page_Load(object sender, EventArgs e)
  14. {
  15. _sl.CheckSession();
  16. LoadSearchData();
  17. }
  18. private void LoadSearchData()
  19. {
  20. var dt = _obj.SearchLedger(GetAccountNum(), GetSearchBy());
  21. if (dt == null || dt.Rows.Count == 0)
  22. return;
  23. _str.Append("<table>");
  24. _str.Append("<tr>");
  25. _str.Append("<td>");
  26. _str.Append("<strong> Item in tree structure </strong>");
  27. _str.Append("</td>");
  28. _str.Append("</tr>");
  29. _str.Append("</table>");
  30. _str.Append("<table border=\"1px\">");
  31. foreach (DataRow dr in dt.Rows)
  32. {
  33. _str.Append("<tr>");
  34. _str.Append("<td>");
  35. _str.Append("" + dr["Name"] + "");
  36. _str.Append("</td>");
  37. _str.Append("</tr>");
  38. }
  39. _str.Append("</table>");
  40. filterList.InnerHtml = _str.ToString();
  41. }
  42. private string GetAccountNum()
  43. {
  44. return GetStatic.ReadQueryString("accNumber", "");
  45. }
  46. private string GetSearchBy()
  47. {
  48. return GetStatic.ReadQueryString("searchBy", "");
  49. }
  50. }
  51. }