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.

68 lines
2.3 KiB

  1. using Swift.DAL.BL.Remit.Transaction;
  2. using Swift.web.Component.Grid;
  3. using Swift.web.Component.Grid.gridHelper;
  4. using Swift.web.Library;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Web;
  11. using System.Web.UI;
  12. using System.Web.UI.WebControls;
  13. using static Swift.web.Remit.Administration.ChangeReferral.CancelTxn;
  14. namespace Swift.web.AgentNew.Transaction.CheckReferral
  15. {
  16. public partial class CheckReferral : System.Web.UI.Page
  17. {
  18. private const string ViewFunctionId = "20307000";
  19. private readonly StaticDataDdl sd = new StaticDataDdl();
  20. private readonly SwiftGrid _grid = new SwiftGrid();
  21. private RemittanceLibrary rl = new RemittanceLibrary();
  22. protected void Page_Load(object sender, EventArgs e)
  23. {
  24. Authenticate();
  25. if (!IsPostBack)
  26. {
  27. //fromDate.Text= DateTime.Now.ToString("yyyy-MM-dd");
  28. var MethodName = Request.Form["MethodName"];
  29. if (MethodName == "SearchTransaction")
  30. SearchTransactionDetails();
  31. }
  32. GetStatic.ResizeFrame(Page);
  33. Misc.MakeNumericTextbox(ref tranId);
  34. }
  35. private void Authenticate()
  36. {
  37. sd.CheckAuthentication(ViewFunctionId);
  38. }
  39. protected string GetUrlRoot()
  40. {
  41. return GetStatic.GetUrlRoot();
  42. }
  43. private void SearchTransactionDetails()
  44. {
  45. TxnResponse _resp = new TxnResponse();
  46. string controlNo = Request.Form["controlNo"];
  47. string tranNo = Request.Form["tranNo"];
  48. var result = (new TranAgentReportDao().GetReferral(GetStatic.GetUser(), controlNo, tranNo));
  49. if (result.Result.Tables[0].Rows.Count.ToString() == "0")
  50. {
  51. var dbresult = rl.ManageInvalidControlNoAttemptAjax(Page, GetStatic.GetUser(), "N");
  52. _resp.ErrorCode = dbresult.ErrorCode;
  53. _resp.Msg = dbresult.Msg;
  54. GetStatic.JsonResponse(_resp, this);
  55. return;
  56. }
  57. else
  58. {
  59. _resp.ErrorCode = "0";
  60. _resp.Msg = "";
  61. GetStatic.JsonResponse(_resp, this);
  62. }
  63. }
  64. }
  65. }