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.

59 lines
1.7 KiB

  1. using Swift.DAL.BL.Remit.Transaction;
  2. using Swift.web.Library;
  3. using System;
  4. namespace Swift.web.AgentPanel.Pay.PayAcDeposit
  5. {
  6. public partial class Domestic : System.Web.UI.Page
  7. {
  8. private readonly StaticDataDdl _sdd = new StaticDataDdl();
  9. private readonly PayAcDepositDao _obj = new PayAcDepositDao();
  10. private const string ViewFunctionId = "40131500";
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. _sdd.CheckSession();
  14. if (!IsPostBack)
  15. {
  16. Authenticate();
  17. hdnTranId.Value = GetStatic.ReadQueryString("tranId", "");
  18. LoadByControlNo();
  19. }
  20. GetStatic.ResizeFrame(Page);
  21. }
  22. private void Authenticate()
  23. {
  24. _sdd.CheckAuthentication(ViewFunctionId);
  25. }
  26. private void LoadByControlNo()
  27. {
  28. if (!string.IsNullOrEmpty(hdnTranId.Value))
  29. {
  30. ucTran.SearchData(hdnTranId.Value, "", "", "", "SEARCH", "ADM: VIEW TXN (SEARCH TRANSACTION)");
  31. }
  32. }
  33. protected void btnPay_Click(object sender, EventArgs e)
  34. {
  35. PayAcDeposit();
  36. }
  37. private void PayAcDeposit()
  38. {
  39. var dbResult = _obj.PayAcDepositDomAgent(GetStatic.GetUser(), hdnTranId.Value, GetStatic.GetAgent());
  40. if (dbResult.ErrorCode == "1")
  41. {
  42. GetStatic.AlertMessage(Page);
  43. return;
  44. }
  45. GetStatic.PrintMessage(Page, dbResult);
  46. Response.Redirect("PendingList.aspx");
  47. }
  48. protected void btnDontPay_Click(object sender, EventArgs e)
  49. {
  50. Response.Redirect("PendingList.aspx");
  51. }
  52. }
  53. }