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.

56 lines
1.7 KiB

  1. using Swift.DAL.BL.AgentPanel.Send;
  2. using Swift.DAL.BL.Transaction.ThirdParty.Mtrade;
  3. using Swift.DAL.Domain;
  4. using Swift.DAL.SwiftDAL;
  5. using Swift.web.Library;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Web;
  10. using System.Web.UI;
  11. using System.Web.UI.WebControls;
  12. namespace Swift.web
  13. {
  14. public partial class TestAPITxnSend : System.Web.UI.Page
  15. {
  16. protected void Page_Load(object sender, EventArgs e)
  17. {
  18. }
  19. protected void btnShowRpt_Click(object sender, EventArgs e)
  20. {
  21. DbResult _dbResult = new DbResult();
  22. if (string.IsNullOrWhiteSpace(cotrolNo.Text))
  23. {
  24. _dbResult.ErrorCode = "1";
  25. _dbResult.Msg = "Control No Is Required!";
  26. GetStatic.AlertMessage(this, _dbResult.Msg);
  27. return;
  28. }
  29. IMtradeSendAPIDao _mtradeApi = new MtradeSendAPIDao();
  30. if (providerDDL.SelectedValue == "mtrade")
  31. {
  32. _dbResult = _mtradeApi.SendTxnMtrade(GetStatic.GetUser(), "mtrade", null, true, cotrolNo.Text);
  33. if (_dbResult.ErrorCode != "1000")
  34. {
  35. _dbResult.ErrorCode = "1";
  36. }
  37. else
  38. {
  39. SendTranIRHDao _st = new SendTranIRHDao();
  40. IRHTranDetail trn = new IRHTranDetail();
  41. trn.tpRefNo = _dbResult.Extra;
  42. trn.tpTranId = _dbResult.Id;
  43. trn.tpExRate = _dbResult.Extra2;
  44. _dbResult = _st.UpdateTPTxns(trn, cotrolNo.Text, GetStatic.GetUser());
  45. }
  46. }
  47. GetStatic.AlertMessage(this, _dbResult.Msg);
  48. }
  49. }
  50. }