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.

79 lines
2.7 KiB

  1. using Swift.DAL.BL.Remit.Transaction;
  2. using Swift.web.Library;
  3. using System;
  4. using System.Data;
  5. using System.Text;
  6. namespace Swift.web.AgentPanel.CustomerInquery
  7. {
  8. public partial class List : System.Web.UI.Page
  9. {
  10. private readonly RemittanceLibrary obj = new RemittanceLibrary();
  11. private readonly RemittanceLibrary _sl = new RemittanceLibrary();
  12. private const string ViewFunctionId = "20177200";
  13. protected void Page_Load(object sender, EventArgs e)
  14. {
  15. Authenticate();
  16. if (!IsPostBack)
  17. {
  18. divTranDetails.Visible = false;
  19. PopulateDdl();
  20. }
  21. }
  22. private void Authenticate()
  23. {
  24. _sl.CheckAuthentication(ViewFunctionId);
  25. }
  26. private void PopulateDdl()
  27. {
  28. _sl.SetDDL(ref country, "EXEC proc_online_dropDownList @flag='allCountrylist'", "countryName", "countryName", "", "Select..");
  29. }
  30. protected void btnSearch_Click(object sender, EventArgs e)
  31. {
  32. SearchLogs();
  33. }
  34. private void SearchLogs()
  35. {
  36. var obj = new TranViewDao();
  37. var dt = obj.ViewInquiry(GetStatic.GetUser(), MobileNo.Text);
  38. if (null == dt)
  39. {
  40. return;
  41. }
  42. var str = new StringBuilder("<table class=\"table table-responsive table-bordered table-striped\">");
  43. str.Append("<tr>");
  44. str.Append("<th>Updated By</th>");
  45. str.Append("<th>Updated Date</th>");
  46. str.Append("<th>Coutry </th>");
  47. str.Append("<th>Message/Complain </th>");
  48. str.Append("<th>Inquiry Type </th>");
  49. str.Append("</tr>");
  50. foreach (DataRow dr in dt.Rows)
  51. {
  52. str.Append("<tr>");
  53. str.Append("<td align='left'>" + dr["createdBy"] + "</td>");
  54. str.Append("<td align='left'>" + dr["createdDate"] + "</td>");
  55. str.Append("<td align='left'>" + dr["Country"] + "</td>");
  56. str.Append("<td align='left'>" + dr["complian"] + "</td>");
  57. str.Append("<td align='left'>" + dr["msgType"] + "</td>");
  58. str.Append("</tr>");
  59. }
  60. str.Append("</table>");
  61. rptLog.InnerHtml = str.ToString();
  62. divTranDetails.Visible = true;
  63. heading.Visible = false;
  64. divSearch.Visible = false;
  65. }
  66. protected void btnAdd_Click(object sender, EventArgs e)
  67. {
  68. var obj = new TranViewDao();
  69. var result = obj.ManageInquiry(GetStatic.GetUser(), MobileNo.Text, msgType.Text, comments.Text, country.Text);
  70. SearchLogs();
  71. }
  72. }
  73. }