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.

155 lines
8.3 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
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. if (hide.Value == "office")
  20. {
  21. officeDiv.Visible = false;
  22. customerDiv.Visible = true;
  23. officeCenterDiv.Visible = false;
  24. Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Print()", true);
  25. }
  26. else if (hide.Value == "customer")
  27. {
  28. customerDiv.Visible = false;
  29. officeDiv.Visible = true;
  30. officeDiv.Attributes["style"] = "margin-top:120px;";
  31. officeCenterDiv.Visible = true;
  32. Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Print()", true);
  33. }
  34. else if (hide.Value == "both")
  35. {
  36. officeDiv.Visible = true;
  37. customerDiv.Visible = true;
  38. officeCenterDiv.Visible = false;
  39. Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Print()", true);
  40. }
  41. }
  42. protected void ShowData()
  43. {
  44. //lblControlNo.Text = GetStatic.GetTranNoName();
  45. DataSet ds = obj.GetSendIntlReceipt(GetControlNo(), GetStatic.GetUser(), "S");
  46. if (ds.Tables.Count >= 1)
  47. {
  48. if (ds.Tables[0].Rows.Count > 0)
  49. {
  50. //Load Sender Information
  51. DataRow sRow = ds.Tables[0].Rows[0];
  52. tranStatus.Text = sRow["tranStatus"].ToString();
  53. senderName.Text = sRow["senderName"].ToString();
  54. sMemId.Text = sRow["sMemId"].ToString();
  55. sAddress.Text = sRow["sAddress"].ToString();
  56. sNativeCountry.Text = sRow["sNativeCountry"].ToString();
  57. purpose.Text = sRow["purpose"].ToString();
  58. sDob.Text = sRow["sDob"].ToString();
  59. sContactNo.Text = sRow["sContactNo"].ToString();
  60. visaStatus.Text = sRow["visaStatus"].ToString();
  61. sContactNo.Text = sRow["sContactNo"].ToString();
  62. //smsToSend.Text = GetSMSText(sRow);
  63. //Load Receiver Information
  64. receiverName.Text = sRow["receiverName"].ToString();
  65. pAgentCountry.Text = sRow["pAgentCountry"].ToString();
  66. paymentMode.Text = sRow["paymentMode"].ToString();
  67. rContactNo.Text = sRow["rContactNo"].ToString();
  68. pAgent.Text = sRow["pAgent"].ToString();
  69. rAddress.Text = sRow["rAddress"].ToString();
  70. pBankName.Text = sRow["pBankName"].ToString();
  71. relationShip.Text = sRow["relwithSender"].ToString();
  72. serial1.Text = sRow["tranId"].ToString();
  73. serial2.Text = sRow["tranId"].ToString();
  74. //comment by gunn
  75. //pBranchName.Text = sRow["pBranchName"].ToString();
  76. pBranchName.Text = sRow["BranchName"].ToString();
  77. accountNo.Text = sRow["accountNo"].ToString();
  78. rAmtWords.Text = GetStatic.NumberToWord(sRow["pAmt"].ToString());
  79. controlNo.Text = sRow["controlNo"].ToString();
  80. createdBy.Text = sRow["createdBy"].ToString();
  81. approvedDate.Text = DateTime.Parse(sRow["createdDate"].ToString()).ToString("yyyy-MM-dd hh:mm:ss tt");
  82. cAmt.Text = GetStatic.ShowWithoutDecimal(sRow["cAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  83. serviceCharge.Text = GetStatic.ShowWithoutDecimal(sRow["serviceCharge"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  84. tAmt.Text = GetStatic.ShowWithoutDecimal(sRow["tAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  85. exRate.Text = sRow["exRate"].ToString() + "&nbsp" + sRow["payoutCurr"].ToString();
  86. pAmt.Text = GetStatic.ShowDecimal(sRow["pAmt"].ToString()) + "&nbsp" + sRow["payoutCurr"].ToString();
  87. depositType.Text = sRow["collMode"].ToString();
  88. depositType1.Text = sRow["collMode"].ToString();
  89. operator1.Text = sRow["createdBy"].ToString();
  90. //for second from
  91. //Load Sender Information
  92. senderName1.Text = sRow["senderName"].ToString();
  93. sMemId1.Text = sRow["sMemId"].ToString();
  94. sAddress1.Text = sRow["sAddress"].ToString();
  95. sNativeCountry1.Text = sRow["sNativeCountry"].ToString();
  96. purpose1.Text = sRow["purpose"].ToString();
  97. sDob1.Text = sRow["sDob"].ToString();
  98. sContactNo1.Text = sRow["sContactNo"].ToString();
  99. visaStatus1.Text = sRow["visaStatus"].ToString();
  100. //Load Receiver Information
  101. receiverName1.Text = sRow["receiverName"].ToString();
  102. pAgentCountry1.Text = sRow["pAgentCountry"].ToString();
  103. paymentMode1.Text = sRow["paymentMode"].ToString();
  104. rContactNo1.Text = sRow["rContactNo"].ToString();
  105. pAgent1.Text = sRow["pAgent"].ToString();
  106. rAddress1.Text = sRow["rAddress"].ToString();
  107. pBankName1.Text = sRow["pBankName"].ToString();
  108. relationShip1.Text = sRow["relwithSender"].ToString();
  109. pBranchName1.Text = sRow["BranchName"].ToString();
  110. accountNo1.Text = sRow["accountNo"].ToString();
  111. rAmtWords1.Text = GetStatic.NumberToWord(sRow["pAmt"].ToString());
  112. controlNo1.Text = sRow["controlNo"].ToString();
  113. createdBy1.Text = sRow["createdBy"].ToString();
  114. approvedDate1.Text = DateTime.Parse(sRow["createdDate"].ToString()).ToString("yyyy-MM-dd hh:mm:ss tt");
  115. cAmt1.Text = GetStatic.ShowWithoutDecimal(sRow["cAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  116. serviceCharge1.Text = GetStatic.ShowWithoutDecimal(sRow["serviceCharge"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  117. tAmt1.Text = GetStatic.ShowWithoutDecimal(sRow["tAmt"].ToString()) + "&nbsp" + sRow["collCurr"].ToString();
  118. exRate1.Text = sRow["exRate"].ToString() + "&nbsp" + sRow["payoutCurr"].ToString();
  119. pAmt1.Text = GetStatic.ShowDecimal(sRow["pAmt"].ToString()) + "&nbsp" + sRow["payoutCurr"].ToString();
  120. operator2.Text = sRow["createdBy"].ToString();
  121. if (sRow["paymentMethod"].ToString().ToUpper().Equals("CASH PAYMENT"))
  122. {
  123. bank3.Attributes.Add("style", "display: none;");
  124. bank4.Attributes.Add("style", "display: none;");
  125. bank5.Attributes.Add("style", "display: none;");
  126. bank6.Attributes.Add("style", "display: none;");
  127. bank7.Attributes.Add("style", "display: none;");
  128. bank8.Attributes.Add("style", "display: none;");
  129. bank9.Attributes.Add("style", "display: none;");
  130. bank10.Attributes.Add("style", "display: none;");
  131. bankLable.InnerHtml = "Cash Location";
  132. bankLable1.InnerHtml = "Cash Location";
  133. }
  134. }
  135. }
  136. }
  137. private string GetControlNo()
  138. {
  139. return GetStatic.ReadQueryString("controlNo", "");
  140. }
  141. }
  142. }