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.

131 lines
7.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. using Common.Helper;
  2. using Repository.DAO.ReceiptDao;
  3. using System;
  4. using System.Data;
  5. namespace JMEAgentSystem.WebPages.Receipt
  6. {
  7. public partial class ViewReceipt : System.Web.UI.Page
  8. {
  9. private readonly ReceiptDao obj = new ReceiptDao();
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. if (!IsPostBack)
  13. {
  14. officeDiv.Visible = true;
  15. customerDiv.Visible = true;
  16. officeCenterDiv.Visible = false;
  17. ShowData();
  18. }
  19. }
  20. protected void ShowData()
  21. {
  22. //lblControlNo.Text = GetStatic.GetTranNoName();
  23. DataSet ds = obj.GetSendIntlReceipt(GetControlNo(), GetStatic.GetUser(), "S");
  24. if (ds.Tables.Count >= 1)
  25. {
  26. if (ds.Tables[0].Rows.Count > 0)
  27. {
  28. //Load Sender Information
  29. DataRow sRow = ds.Tables[0].Rows[0];
  30. senderName.Text = sRow["senderName"].ToString();
  31. sMemId.Text = sRow["sMemId"].ToString();
  32. sAddress.Text = sRow["sAddress"].ToString();
  33. sNativeCountry.Text = sRow["sNativeCountry"].ToString();
  34. purpose.Text = sRow["purpose"].ToString();
  35. sDob.Text = sRow["sDob"].ToString();
  36. sContactNo.Text = sRow["sContactNo"].ToString();
  37. visaStatus.Text = sRow["visaStatus"].ToString();
  38. sContactNo.Text = sRow["sContactNo"].ToString();
  39. //smsToSend.Text = GetSMSText(sRow);
  40. //Load Receiver Information
  41. receiverName.Text = sRow["receiverName"].ToString();
  42. pAgentCountry.Text = sRow["pAgentCountry"].ToString();
  43. paymentMode.Text = sRow["paymentMode"].ToString();
  44. rContactNo.Text = sRow["rContactNo"].ToString();
  45. pAgent.Text = sRow["pAgent"].ToString();
  46. rAddress.Text = sRow["rAddress"].ToString();
  47. pBankName.Text = sRow["pBankName"].ToString();
  48. relationShip.Text = sRow["relwithSender"].ToString();
  49. serial1.Text = sRow["tranId"].ToString();
  50. serial2.Text = sRow["tranId"].ToString();
  51. //comment by gunn
  52. //pBranchName.Text = sRow["pBranchName"].ToString();
  53. pBranchName.Text = sRow["BranchName"].ToString();
  54. accountNo.Text = sRow["accountNo"].ToString();
  55. rAmtWords.Text = GetStatic.NumberToWord(sRow["pAmt"].ToString());
  56. controlNo.Text = sRow["controlNo"].ToString();
  57. createdBy.Text = sRow["createdBy"].ToString();
  58. approvedDate.Text = DateTime.Parse(sRow["createdDate"].ToString()).ToString("yyyy-MM-dd hh:mm:ss tt");
  59. cAmt.Text = GetStatic.ShowWithoutDecimal(sRow["cAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  60. serviceCharge.Text = GetStatic.ShowWithoutDecimal(sRow["serviceCharge"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  61. tAmt.Text = GetStatic.ShowWithoutDecimal(sRow["tAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  62. exRate.Text = sRow["exRate"].ToString() + "&nbsp" + sRow["payoutCurr"].ToString();
  63. pAmt.Text = GetStatic.ShowDecimal(sRow["pAmt"].ToString()) + "&nbsp" + sRow["payoutCurr"].ToString();
  64. depositType.Text = sRow["collMode"].ToString();
  65. depositType1.Text = sRow["collMode"].ToString();
  66. operator1.Text = sRow["createdBy"].ToString();
  67. //for second from
  68. //Load Sender Information
  69. senderName1.Text = sRow["senderName"].ToString();
  70. sMemId1.Text = sRow["sMemId"].ToString();
  71. sAddress1.Text = sRow["sAddress"].ToString();
  72. sNativeCountry1.Text = sRow["sNativeCountry"].ToString();
  73. purpose1.Text = sRow["purpose"].ToString();
  74. sDob1.Text = sRow["sDob"].ToString();
  75. sContactNo1.Text = sRow["sContactNo"].ToString();
  76. visaStatus1.Text = sRow["visaStatus"].ToString();
  77. //Load Receiver Information
  78. receiverName1.Text = sRow["receiverName"].ToString();
  79. pAgentCountry1.Text = sRow["pAgentCountry"].ToString();
  80. paymentMode1.Text = sRow["paymentMode"].ToString();
  81. rContactNo1.Text = sRow["rContactNo"].ToString();
  82. pAgent1.Text = sRow["pAgent"].ToString();
  83. rAddress1.Text = sRow["rAddress"].ToString();
  84. pBankName1.Text = sRow["pBankName"].ToString();
  85. relationShip1.Text = sRow["relwithSender"].ToString();
  86. pBranchName1.Text = sRow["BranchName"].ToString();
  87. accountNo1.Text = sRow["accountNo"].ToString();
  88. rAmtWords1.Text = GetStatic.NumberToWord(sRow["pAmt"].ToString());
  89. controlNo1.Text = sRow["controlNo"].ToString();
  90. createdBy1.Text = sRow["createdBy"].ToString();
  91. approvedDate1.Text = DateTime.Parse(sRow["createdDate"].ToString()).ToString("yyyy-MM-dd hh:mm:ss tt");
  92. cAmt1.Text = GetStatic.ShowWithoutDecimal(sRow["cAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  93. serviceCharge1.Text = GetStatic.ShowWithoutDecimal(sRow["serviceCharge"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  94. tAmt1.Text = GetStatic.ShowWithoutDecimal(sRow["tAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  95. exRate1.Text = sRow["exRate"].ToString() + "&nbsp" + sRow["payoutCurr"].ToString();
  96. pAmt1.Text = GetStatic.ShowDecimal(sRow["pAmt"].ToString()) + "&nbsp" + sRow["payoutCurr"].ToString();
  97. operator2.Text = sRow["createdBy"].ToString();
  98. if (sRow["paymentMethod"].ToString().ToUpper().Equals("CASH PAYMENT"))
  99. {
  100. bank3.Attributes.Add("style", "display: none;");
  101. bank4.Attributes.Add("style", "display: none;");
  102. bank5.Attributes.Add("style", "display: none;");
  103. bank6.Attributes.Add("style", "display: none;");
  104. bank7.Attributes.Add("style", "display: none;");
  105. bank8.Attributes.Add("style", "display: none;");
  106. bank9.Attributes.Add("style", "display: none;");
  107. bank10.Attributes.Add("style", "display: none;");
  108. bankLable.InnerHtml = "Cash Location";
  109. bankLable1.InnerHtml = "Cash Location";
  110. }
  111. }
  112. }
  113. }
  114. private string GetControlNo()
  115. {
  116. return GetStatic.ReadQueryString("controlNo", "");
  117. }
  118. }
  119. }