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.

97 lines
3.7 KiB

  1. using System;
  2. using Swift.DAL.BL.Remit.Transaction;
  3. using Swift.web.Library;
  4. namespace Swift.web.Remit.Transaction.PayAcDepositV3.PaidTransaction
  5. {
  6. public partial class PayIntl : System.Web.UI.Page
  7. {
  8. private readonly StaticDataDdl _sdd = new StaticDataDdl();
  9. private readonly PayAcDepositDao _obj = new PayAcDepositDao();
  10. private const string ViewFunctionId = "20122500";
  11. private string _fromDate = "";
  12. private string _toDate = "";
  13. private string _fromTime = "";
  14. private string _toTime = "";
  15. protected void Page_Load(object sender, EventArgs e)
  16. {
  17. _fromDate = GetStatic.ReadQueryString("fromDate", "");
  18. _toDate = GetStatic.ReadQueryString("toDate", "");
  19. _fromTime = GetStatic.ReadQueryString("fromTime", "");
  20. _toTime = GetStatic.ReadQueryString("toTime", "");
  21. hdnPAgent.Value = GetStatic.ReadQueryString("pAgent", "");
  22. hdnTranId.Value = GetStatic.ReadQueryString("tranId", "");
  23. hdnPAgentName.Value = GetStatic.ReadQueryString("pAgentName", "");
  24. hdnIsApi.Value = GetStatic.ReadQueryString("isApi", "");
  25. hdnRowId.Value = GetStatic.ReadQueryString("rowId", "");
  26. lblBankName.Text = hdnPAgentName.Value;
  27. if (!IsPostBack)
  28. {
  29. Authenticate();
  30. LoadByControlNo();
  31. }
  32. GetStatic.ResizeFrame(Page);
  33. }
  34. private void Authenticate()
  35. {
  36. _sdd.CheckAuthentication(ViewFunctionId);
  37. }
  38. private void LoadByControlNo()
  39. {
  40. if (!string.IsNullOrEmpty(hdnTranId.Value))
  41. ucTran.SearchData(hdnTranId.Value, "", "", "", "SEARCH", "ADM: VIEW TXN (SEARCH TRANSACTION)");
  42. }
  43. protected void btnPay_Click(object sender, EventArgs e)
  44. {
  45. PayAcDeposit("Y");
  46. }
  47. private void PayAcDeposit(string IsHoPaid)
  48. {
  49. //if(hdnIsApi.Value =="R")
  50. //{
  51. // var obj = new RiaPayDao();
  52. // var dr = obj.PayConfirmBankV2(GetStatic.GetUser(), hdnRowId.Value);
  53. // GetStatic.AlertMessage(Page, dr.Msg);
  54. // if (dr.ErrorCode.Equals("1"))
  55. // {
  56. // GetStatic.AlertMessage(Page);
  57. // return;
  58. // }
  59. //}
  60. //if(hdnIsApi.Value =="A")
  61. //{
  62. // var ceDao = new CashExpressDao();
  63. // var dr = ceDao.PayApi(GetStatic.GetUser(), hdnRowId.Value, ucTran.CtrlNo, "A");
  64. // GetStatic.AlertMessage(Page, dr.Msg);
  65. // if (dr.ErrorCode.Equals("1"))
  66. // {
  67. // GetStatic.AlertMessage(Page);
  68. // return;
  69. // }
  70. //}
  71. var dbResult = _obj.PayIntl(GetStatic.GetUser(), hdnTranId.Value, hdnPAgent.Value, IsHoPaid);
  72. if (dbResult.ErrorCode == "1")
  73. {
  74. GetStatic.AlertMessage(Page);
  75. return;
  76. }
  77. GetStatic.PrintMessage(Page, dbResult);
  78. Response.Redirect("PendingIntl.aspx?pAgent=" + hdnPAgent.Value + "&pAgentName=" + hdnPAgentName.Value + "&fromDate="+_fromDate+"&toDate="+_toDate+"&fromTime="+_fromTime+"&toTime="+_toTime);
  79. }
  80. protected void btnDontPay_Click(object sender, EventArgs e)
  81. {
  82. Response.Redirect("PendingIntl.aspx?pAgent=" + hdnPAgent.Value + "&pAgentName=" + hdnPAgentName.Value + "&fromDate=" + _fromDate + "&toDate=" + _toDate + "&fromTime=" + _fromTime + "&toTime=" + _toTime);
  83. }
  84. protected void btnPayOnBehalf_Click(object sender, EventArgs e)
  85. {
  86. PayAcDeposit("N");
  87. }
  88. }
  89. }