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.9 KiB

  1. using System;
  2. using Swift.DAL.BL.Remit.Transaction;
  3. using Swift.web.Library;
  4. namespace Swift.web.AgentPanel.Send.SendApprove
  5. {
  6. public partial class Reject : System.Web.UI.Page
  7. {
  8. private const string ViewFunctionId = "40161236";
  9. private readonly StaticDataDdl _sdd = new StaticDataDdl();
  10. private readonly ApproveTransactionDao atd = new ApproveTransactionDao();
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. GetStatic.AttachConfirmMsg(ref btnReject, "Are you sure to reject this transaction?");
  14. if (!IsPostBack)
  15. {
  16. Authenticate();
  17. }
  18. //LoadTransaction();
  19. }
  20. private void Authenticate()
  21. {
  22. _sdd.CheckAuthentication(ViewFunctionId);
  23. }
  24. //private void LoadTransaction()
  25. //{
  26. // string tranNo = GetTranNo();
  27. // ucTran.SearchData(tranNo, "", "", "", "REJECT", "ADMIN: VIEW TXN TO REJECT");
  28. // divTranDetails.Visible = ucTran.TranFound;
  29. // if (!ucTran.TranFound)
  30. // {
  31. // divControlno.InnerHtml = "<h2>No Transaction Found</h2>";
  32. // return;
  33. // }
  34. //}
  35. protected string GetTranNo()
  36. {
  37. return GetStatic.ReadQueryString("id", "");
  38. }
  39. private void ManageReject()
  40. {
  41. var dr = atd.Reject(GetStatic.GetUser(), GetTranNo(), remarks.Text, GetStatic.GetSettlingAgent());
  42. GetStatic.AlertMessage(Page, dr.Msg);
  43. if (dr.ErrorCode.Equals("0"))
  44. {
  45. GetStatic.CallJSFunction(Page, "window.returnValue = true; window.close();");
  46. }
  47. }
  48. protected void btnReject_Click(object sender, EventArgs e)
  49. {
  50. ManageReject();
  51. }
  52. }
  53. }