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.

64 lines
2.1 KiB

  1. using System;
  2. using Swift.DAL.BL.Remit.Transaction;
  3. using Swift.web.Library;
  4. namespace Swift.web.Remit.Transaction.Modify
  5. {
  6. public partial class ModifyTran : System.Web.UI.Page
  7. {
  8. private const string ViewFunctionId = "20121500";
  9. private const string ProcessFunctionId = "20121510";
  10. readonly StaticDataDdl sd = new StaticDataDdl();
  11. private readonly ModifyTransactionDao _obj = new ModifyTransactionDao();
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14. Authenticate();
  15. if (!IsPostBack)
  16. {
  17. }
  18. // GetStatic.ResizeFrame(Page);
  19. //GetStatic.Process(ref btnSearchDetail);
  20. }
  21. private void Authenticate()
  22. {
  23. sd.CheckAuthentication(ViewFunctionId + "," + ProcessFunctionId);
  24. }
  25. protected void btnSearchDetail_Click(object sender, EventArgs e)
  26. {
  27. LoadByControlNo(controlNo.Text);
  28. }
  29. private void LoadByControlNo(string cNo)
  30. {
  31. if (sd.HasRight(ProcessFunctionId))
  32. ucTran.SearchData("", cNo, "u", "", "MODIFY", "ADM: MODIFY TXN");
  33. else
  34. ucTran.SearchData("", cNo, "", "", "MODIFY", "ADM: MODIFY TXN");
  35. if (!ucTran.TranFound)
  36. {
  37. PrintMessage("Transaction not found!");
  38. return;
  39. }
  40. if (ucTran.TranStatus != "Payment")
  41. {
  42. string status = ucTran.TranStatus;
  43. divTranDetails.Visible = false;
  44. PrintMessage("Transaction not authorised for modification; Status:" + status + "!");
  45. return;
  46. }
  47. divTranDetails.Visible = ucTran.TranFound;
  48. divSearch.Visible = ucTran.TranFound; //! thiyo agadi...
  49. }
  50. private void PrintMessage(string msg)
  51. {
  52. GetStatic.CallBackJs1(Page, "Msg", "RemoveProcessDivWithMsg('" + msg + "');");
  53. }
  54. protected void btnReloadDetail_Click(object sender, EventArgs e)
  55. {
  56. LoadByControlNo(ucTran.CtrlNo);
  57. }
  58. }
  59. }