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.

917 lines
53 KiB

10 months ago
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/AgentNew/AgentMain.Master" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Swift.web.AgentNew.Administration.CustomerSetup.Benificiar.Manage" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  3. <link href="../../../css/Document.css" rel="stylesheet" />
  4. <style>
  5. .table .table {
  6. background-color: #F5F5F5 !important;
  7. }
  8. input, textarea {
  9. text-transform: uppercase;
  10. }
  11. .errormsg1 {
  12. font-size: 12px;
  13. color: #FA4345;
  14. }
  15. </style>
  16. <script type="text/javascript">
  17. $(document).ready(function () {
  18. $("#<%=receiverAccountNo.ClientID%>").keydown(function (event) {
  19. if (event.keyCode == 32) {
  20. event.preventDefault();
  21. }
  22. });
  23. $('#isFromPhone').click(function () {
  24. if ($(this).is(':checked')) {
  25. $('#customerDocument').hide();
  26. } else {
  27. $('#customerDocument').show();
  28. }
  29. });
  30. $('#<%=ddlRelationship.ClientID%>').change(function () {
  31. $('#ContentPlaceHolder1_otherRelationDiv').hide();
  32. if ($('#<%=ddlRelationship.ClientID%>').val() === '11339') {
  33. $('#ContentPlaceHolder1_otherRelationDiv').show();
  34. }
  35. });
  36. $('#<%=ddlPurposeOfRemitance.ClientID%>').change(function () {
  37. $('#ContentPlaceHolder1_otherPurposeDiv').hide();
  38. if ($('#<%=ddlPurposeOfRemitance.ClientID%>').val() === '11347') {
  39. $('#ContentPlaceHolder1_otherPurposeDiv').show();
  40. }
  41. if ($('#<%=ddlPurposeOfRemitance.ClientID%>').val() === '11345') {
  42. $('#ContentPlaceHolder1_goodsInfoDiv').show();
  43. } else {
  44. $('#ContentPlaceHolder1_goodsInfoDiv').hide();
  45. }
  46. });
  47. var a = $("#<%=hideSearchDivVal.ClientID%>").val();
  48. if (a == "true") {
  49. $("#<%=hideSearchDivVal.ClientID%>").hide();
  50. $('.main-nav').hide();
  51. }
  52. $('#<%=register.ClientID%>').click(function () {
  53. return CheckFormValidation();
  54. });
  55. $(document).on('change', '#<%=ddlIdType.ClientID%>', function () {
  56. $('#<%=txtIdValue.ClientID%>').val('');
  57. idTypeVal = $(this).val();
  58. if (idTypeVal !== null && idTypeVal !== "" && idTypeVal !== "0") {
  59. $('#<%=txtIdValue.ClientID%>').removeAttr('disabled');
  60. $('#<%=idNumberErr.ClientID%>').show();
  61. }
  62. else {
  63. $('#<%=txtIdValue.ClientID%>').attr('disabled', 'disabled');
  64. $('#<%=idNumberErr.ClientID%>').hide();
  65. $('#<%=ddlIdType.ClientID%>').removeAttr('style');
  66. $('#<%=txtIdValue.ClientID%>').removeAttr('style');
  67. }
  68. });
  69. $(document).on('change', '#<%=ddlPayoutPatner.ClientID%>', function () {
  70. var bankId = $('#<%=ddlPayoutPatner.ClientID%> option:selected').val();
  71. var countryId = $('#<%=ddlCountry.ClientID%> option:selected').val();
  72. var pMode = $('#<%=ddlPaymentMode.ClientID%> option:selected').val();
  73. var data = { MethodName: "GetBankBranch", bankId: bankId, countryId: countryId, pMode: pMode, branchId: null };
  74. $.post("", data, function (response) {
  75. PopulateBranchDDL(response, "<%=DDLBankBranch.ClientID%>", "Select Branch");
  76. });
  77. });
  78. hideShowMenuBar();
  79. });
  80. function CheckForMobileNumber(nField, fieldName) {
  81. var numberPattern = /^[+]?[0-9]{6,16}$/;
  82. test = numberPattern.test(nField.value);
  83. if (!test) {
  84. alert(fieldName + ' Is Not Valid !');
  85. nField.value = '';
  86. return false
  87. }
  88. return true;
  89. }
  90. function CheckForPhoneNumber(nField, fieldName) {
  91. var numberPattern = /^[+]?[0-9]{6,15}$/;
  92. test = numberPattern.test(nField.value);
  93. if (!test) {
  94. alert(fieldName + ' Is Not Valid !');
  95. nField.value = '';
  96. return false
  97. }
  98. return true;
  99. }
  100. function hideShowMenuBar() {
  101. var addType = '<%=GetReceiverAddType()%>';
  102. if (addType === "s") {
  103. $('.navbar.navbar-inverse.yamm.navbar-fixed-top.main-nav').hide();
  104. $('.listtabs').hide();
  105. }
  106. }
  107. function PopulatePaymentMethod() {
  108. var data =
  109. {
  110. MethodName: "PopulatePaymentMode",
  111. country: $("#<%=ddlCountry.ClientID%> option:selected").text()
  112. };
  113. $.ajax({
  114. url: "",
  115. type: "post",
  116. data: data,
  117. dataType: "json",
  118. async: false,
  119. success: function (response) {
  120. PopulateDDL(response, '<%=ddlPaymentMode.ClientID%>', "", "", "");
  121. },
  122. error: function (error) {
  123. alert("Something went wrong!!!")
  124. }
  125. })
  126. }
  127. function PopulatePayoutPartner() {
  128. $('#<%=ddlPayoutPatner.ClientID%>').empty();
  129. $('#<%=DDLBankBranch.ClientID%>').empty();
  130. var pmode = $("#<%=ddlPaymentMode.ClientID%> option:selected").val();
  131. if (pmode == "2") {
  132. $("#<%=agentBankBranchDiv.ClientID%>").show();
  133. $("#<%=receiverAccountNo.ClientID%>").show();
  134. }
  135. else if (pmode == "13") {
  136. $("#<%=agentBankBranchDiv.ClientID%>").hide();
  137. $("#<%=receiverAccountNo.ClientID%>").show();
  138. $("#<%=beneficiaryAccount.ClientID%>").text('Beneficiary Wallet #');
  139. // document.getElementById('ContentPlaceHolder1_beneficiaryAccount').innerHTML = 'Beneficiary Wallet #';
  140. }
  141. else {
  142. $("#<%=receiverAccountNo.ClientID%>").hide();
  143. $("#<%=DDLBankBranch.ClientID%>").val('');
  144. $("#<%=agentBankBranchDiv.ClientID%>").hide();
  145. }
  146. var data =
  147. {
  148. MethodName: "PopulatePayoutPartner",
  149. country: $("#<%=ddlCountry.ClientID%> option:selected").val(),
  150. paymentMode: $("#<%=ddlPaymentMode.ClientID%> option:selected").text()
  151. };
  152. $.post("", data, function (response) {
  153. PopulateDDL(response, '<%=ddlPayoutPatner.ClientID%>', "", "", "");
  154. }).fail(function (error) {
  155. alert("Something went wrong!!!");
  156. });
  157. }
  158. function PopulateBranchDDL(populateData, ddlId, defaultText) {
  159. var myDDL = document.getElementById(ddlId);
  160. $(myDDL).empty();
  161. var option;
  162. if (defaultText != '') {
  163. option = document.createElement('option');
  164. option.text = defaultText;
  165. option.value = '';
  166. myDDL.options.add(option);
  167. }
  168. for (var i = 0; i < populateData.length; i++) {
  169. option = document.createElement('option');
  170. option.text = populateData[i].agentName;
  171. option.value = populateData[i].agentId;
  172. try {
  173. myDDL.options.add(option);
  174. } catch (e) {
  175. alert(e.message);
  176. }
  177. }
  178. }
  179. function PopulateDDL(populateData, ddlId, selectedId, selectedText, defaultText) {
  180. var myDDL = document.getElementById(ddlId);
  181. $(myDDL).empty();
  182. var option;
  183. if (defaultText != '') {
  184. option = document.createElement('option');
  185. option.text = defaultText;
  186. option.value = '';
  187. myDDL.options.add(option);
  188. }
  189. for (var i = 0; i < populateData.length; i++) {
  190. option = document.createElement('option');
  191. if (ddlId == '<%=ddlPaymentMode.ClientID%>') {
  192. option.text = populateData[i].Value;
  193. option.value = populateData[i].Key;
  194. } else {
  195. option.text = populateData[i].AGENTNAME;
  196. option.value = populateData[i].bankId;
  197. }
  198. if (selectedId != '' && selectedId == populateData[i].value) {
  199. option.selected = true;
  200. } else if (selectedText != '' && selectedText.toUpperCase() == populateData[i].Key.toUpperCase()) {
  201. option.selected = true;
  202. }
  203. try {
  204. myDDL.options.add(option);
  205. } catch (e) {
  206. alert(e.message);
  207. }
  208. }
  209. }
  210. function getUrlVars() {
  211. var vars = [], hash;
  212. var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  213. for (var i = 0; i < hashes.length; i++) {
  214. hash = hashes[i].split('=');
  215. vars.push(hash[0]);
  216. vars[hash[0]] = hash[1];
  217. }
  218. return vars;
  219. }
  220. function showTextBox() {
  221. var res = $("#<% =ddlRelationship.ClientID%>").val();
  222. if (res.toUpperCase() == "11065") {
  223. $("#<%=otherRelationDiv.ClientID%>").show();
  224. }
  225. else {
  226. $("#<%=otherRelationDiv.ClientID%>").hide();
  227. }
  228. }
  229. function CheckFormValidation() {
  230. $('#<%=ddlIdType.ClientID%>').removeAttr('style');
  231. $('#<%=txtIdValue.ClientID%>').removeAttr('style');
  232. var input = $("#<%=txtSenderMobileNo.ClientID%>");
  233. var mobileNo = input.val();
  234. if (mobileNo != '') {
  235. var countryCode = $('.country.active .dial-code').text();
  236. var maxLength = input.attr('maxLength');
  237. if (mobileNo.indexOf(countryCode) < 0) {
  238. mobileNo = countryCode + mobileNo;
  239. }
  240. if (mobileNo.length > maxLength) {
  241. alert('Mobile No. Can allow input maxmum ' + maxLength + ' digit only');
  242. $("#<%=txtSenderMobileNo.ClientID%>").val('');
  243. return false;
  244. }
  245. $("#<%=txtSenderMobileNo.ClientID%>").val(mobileNo);
  246. var numberPattern = /^[+]?[0-9]{6,16}$/;
  247. test = numberPattern.test(mobileNo);
  248. if (!test) {
  249. alert('Mobile No Is Not Valid !');
  250. input.val('');
  251. return false
  252. }
  253. }
  254. paymentMode = $("#<% =ddlPaymentMode.ClientID%>").val();
  255. var reqField = "<%=ddlCountry.ClientID%>,<%=ddlBenificiaryType.ClientID%>,<%=txtReceiverFName.ClientID%>,<%=txtReceiverLName.ClientID%>,<%=txtReceiverAddress.ClientID%>,<%=ddlPaymentMode.ClientID%>,<%=ddlNativeCountry.ClientID%>,";
  256. idTypeVal = $('#<%=ddlIdType.ClientID%>').val();
  257. idTypeNumber = $('#<%=txtIdValue.ClientID%>').val();
  258. if ((idTypeVal !== null && idTypeVal !== "" && idTypeVal !== "0") || (idTypeNumber !== null && idTypeNumber !== "" && idTypeNumber !== "0")) {
  259. reqField +="<%=ddlIdType.ClientID%>,<%=txtIdValue.ClientID%>,";
  260. }
  261. if ($('#<%=ddlPurposeOfRemitance.ClientID%>').val() === '11345') {
  262. reqField += "<%=goodsType.ClientID%>,<%=goodsOrigin.ClientID%>,<%=portOfShipment.ClientID%>,";
  263. }
  264. var receiverId = '<%=GetReceiverId()%>';
  265. <%--if (receiverId !== '' || $("#isFromPhone").prop("checked") === true) {
  266. reqField = reqField.replace(",<%=beneficiary_reg.ClientID%>,", ",");
  267. $(".errormsg1").hide();
  268. } else {
  269. $(".errormsg1").show();
  270. }--%>
  271. if (ValidRequiredFieldWithDocNew(reqField) === false) {
  272. return false;
  273. }
  274. $('#<%=register.ClientID%>').attr('disabled', 'disabled');
  275. saveNew();
  276. };
  277. function save() {
  278. var addType = '<%=GetReceiverAddType()%>';
  279. var bankBranch = $("#<%=DDLBankBranch.ClientID%> option:selected").val();
  280. if (bankBranch === undefined || bankBranch === null || bankBranch.length < 0) {
  281. bankBranch = "";
  282. }
  283. var data =
  284. {
  285. MethodName: "SaveReceiverDetails",
  286. nativeCountry: $("#<%=ddlNativeCountry.ClientID%>").val(),
  287. paymentMode: $("#<%=ddlPaymentMode.ClientID%> option:selected").val(),
  288. PayoutPatner: $("#<%=ddlPayoutPatner.ClientID%> option:selected").val(),
  289. Country: $("#<%=ddlCountry.ClientID%> option:selected").text().split('(')[0],
  290. BenificiaryType: $("#<%=ddlBenificiaryType.ClientID%> option:selected").val(),
  291. Email: $("#<%=txtEmail.ClientID%>").val(),
  292. ReceiverFName: $("#<%=txtReceiverFName.ClientID%>").val(),
  293. ReceiverMName: $("#<%=txtReceiverMName.ClientID%>").val(),
  294. ReceiverLName: $("#<%=txtReceiverLName.ClientID%>").val(),
  295. ReceiverAddress: $("#<%=txtReceiverAddress.ClientID%>").val(),
  296. ReceiverCity: $("#<%=txtReceiverCity.ClientID%>").val(),
  297. ContactNo: $("#<%=txtContactNo.ClientID%>").val(),
  298. SenderMobileNo: $("#<%=txtSenderMobileNo.ClientID%>").val(),
  299. Relationship: $("#<%=ddlRelationship.ClientID%> option:selected").val(),
  300. RelationshipOther: $("#<%=otherRelationshipTextBox.ClientID%>").val(),
  301. PlaceOfIssue: $("#<%=txtPlaceOfIssue.ClientID%>").val(),
  302. TypeId: $("#<%=ddlIdType.ClientID%> option:selected").val(),
  303. TypeValue: $("#<%=txtIdValue.ClientID%>").val(),
  304. BenificaryAc: $("#<%=receiverAccountNo.ClientID%>").val(),
  305. PurposeOfRemitance: $("#<%=ddlPurposeOfRemitance.ClientID%>").val(),
  306. PurposeOfRemitanceOther: $("#<%=purposeOther.ClientID%>").val(),
  307. BankLocation: bankBranch,
  308. BankName: $("#<%=txtBankName.ClientID%>").val(),
  309. BenificaryAc: $("#<%=txtBenificaryAc.ClientID%>").val(),
  310. Remarks: $("#<%=txtRemarks.ClientID%>").val(),
  311. OtherRelationDescription: $("#<%=otherRelationshipTextBox.ClientID%>").val(),
  312. membershipId: $("#<%=hideMembershipId.ClientID%>").val(),
  313. ReceiverId: $("#<%=hideBenificialId.ClientID%>").val(),
  314. hideCustomerId: $("#<%=hideCustomerId.ClientID%>").val(),
  315. hideBenificialId: $("#<%=hideBenificialId.ClientID%>").val(),
  316. goodsType: $("#<%=goodsType.ClientID%>").val(),
  317. goodsOrigin: $("#<%=goodsOrigin.ClientID%>").val(),
  318. portOfShipment: $("#<%=portOfShipment.ClientID%>").val()
  319. };
  320. $.ajax({
  321. url: "",
  322. type: "post",
  323. data: data,
  324. dataType: "json",
  325. success: function (response) {
  326. if (response.ErrorCode == "1") {
  327. alert(response.Msg);
  328. return false;
  329. } else {
  330. if (addType.toLowerCase() == "s") {
  331. CallBack(response.Id);
  332. }
  333. else {
  334. var hide = $("#<%=hideSearchDivVal.ClientID%>").val();
  335. if (hide === "true") {
  336. window.location.href = "List.aspx?customerDetails=true&customerId=" + response.Extra + "&hideSearchDiv=true";
  337. } else {
  338. window.location.href = "List.aspx?customerDetails=true&customerId=" + response.Extra + "";
  339. }
  340. return;
  341. }
  342. return true;
  343. }
  344. },
  345. error: function (error) {
  346. alert("Something went wrong!!!");
  347. return false;
  348. }
  349. })
  350. }
  351. function saveNew() {
  352. var addType = '<%=GetReceiverAddType()%>';
  353. var bankBranch = $("#<%=DDLBankBranch.ClientID%> option:selected").val();
  354. if (bankBranch === undefined || bankBranch === null || bankBranch.length < 0) {
  355. bankBranch = "";
  356. }
  357. var MethodName = "SaveReceiverDetails";
  358. var nativeCountry = $("#<%=ddlNativeCountry.ClientID%>").val();
  359. var paymentMode = $("#<%=ddlPaymentMode.ClientID%> option:selected").val();
  360. var PayoutPatner = $("#<%=ddlPayoutPatner.ClientID%> option:selected").val();
  361. var Country = $("#<%=ddlCountry.ClientID%> option:selected").text();
  362. var BenificiaryType = $("#<%=ddlBenificiaryType.ClientID%> option:selected").val();
  363. var Email = $("#<%=txtEmail.ClientID%>").val();
  364. var ReceiverFName = $("#<%=txtReceiverFName.ClientID%>").val();
  365. var ReceiverMName = $("#<%=txtReceiverMName.ClientID%>").val();
  366. var ReceiverLName = $("#<%=txtReceiverLName.ClientID%>").val();
  367. var ReceiverAddress = $("#<%=txtReceiverAddress.ClientID%>").val();
  368. var ReceiverCity = $("#<%=txtReceiverCity.ClientID%>").val();
  369. var ContactNo = $("#<%=txtContactNo.ClientID%>").val();
  370. var SenderMobileNo = $("#<%=txtSenderMobileNo.ClientID%>").val();
  371. var Relationship = $("#<%=ddlRelationship.ClientID%> option:selected").val();
  372. var RelationshipOther = $("#<%=otherRelationshipTextBox.ClientID%>").val();
  373. var PlaceOfIssue = $("#<%=txtPlaceOfIssue.ClientID%>").val();
  374. var TypeId = $("#<%=ddlIdType.ClientID%> option:selected").val();
  375. var TypeValue = $("#<%=txtIdValue.ClientID%>").val();
  376. var PurposeOfRemitance = $("#<%=ddlPurposeOfRemitance.ClientID%>").val();
  377. var PurposeOfRemitanceOther = $("#<%=purposeOther.ClientID%>").val();
  378. var BankLocation = bankBranch;
  379. var BankName = $("#<%=ddlPayoutPatner.ClientID%> option:selected").text();
  380. var BenificaryAc = $("#<%=txtBenificaryAc.ClientID%>").val();
  381. var Remarks = $("#<%=txtRemarks.ClientID%>").val();
  382. var membershipId = $("#<%=hideMembershipId.ClientID%>").val();
  383. var ReceiverId = $("#<%=hideBenificialId.ClientID%>").val();
  384. var hideCustomerId = $("#<%=hideCustomerId.ClientID%>").val();
  385. var hideBenificialId = $("#<%=hideBenificialId.ClientID%>").val();
  386. var goodsType = $("#<%=goodsType.ClientID%>").val();
  387. var goodsOrigin = $("#<%=goodsOrigin.ClientID%>").val();
  388. var portOfShipment = $("#<%=portOfShipment.ClientID%>").val();
  389. var formData = new FormData();
  390. // var beneficiaryRefForm = $("#" + mId + "beneficiary_reg")[0].files;
  391. //if (beneficiaryRefForm.length > 0)
  392. // formData.append(beneficiaryRefForm.name, beneficiaryRefForm[0]);
  393. var isFromPhone = $("#isFromPhone").prop("checked");
  394. formData.append("isFromPhone", isFromPhone);
  395. formData.append("MethodName", MethodName);
  396. formData.append("nativeCountry", nativeCountry);
  397. formData.append("paymentMode", paymentMode);
  398. formData.append("PayoutPatner", PayoutPatner);
  399. formData.append("Country", Country);
  400. formData.append("BenificiaryType", BenificiaryType);
  401. formData.append("Email", Email);
  402. formData.append("ReceiverFName", ReceiverFName);
  403. formData.append("ReceiverMName", ReceiverMName);
  404. formData.append("ReceiverLName", ReceiverLName);
  405. formData.append("ReceiverAddress", ReceiverAddress);
  406. formData.append("ReceiverCity", ReceiverCity);
  407. formData.append("ContactNo", ContactNo);
  408. formData.append("SenderMobileNo", SenderMobileNo);
  409. formData.append("Relationship", Relationship);
  410. formData.append("RelationshipOther", RelationshipOther);
  411. formData.append("PlaceOfIssue", PlaceOfIssue);
  412. formData.append("TypeId", TypeId);
  413. formData.append("TypeValue", TypeValue);
  414. formData.append("PurposeOfRemitance", PurposeOfRemitance);
  415. formData.append("PurposeOfRemitanceOther", PurposeOfRemitanceOther);
  416. formData.append("BankLocation", BankLocation);
  417. formData.append("BankName", BankName);
  418. formData.append("BenificaryAc", BenificaryAc);
  419. formData.append("Remarks", Remarks);
  420. formData.append("membershipId", membershipId);
  421. formData.append("ReceiverId", ReceiverId);
  422. formData.append("hideCustomerId", hideCustomerId);
  423. formData.append("hideBenificialId", hideBenificialId);
  424. formData.append("goodsType", goodsType);
  425. formData.append("goodsOrigin", goodsOrigin);
  426. formData.append("portOfShipment", portOfShipment);
  427. $.ajax({
  428. url: "",
  429. type: "post",
  430. data: formData,
  431. dataType: "json",
  432. contentType: false, // Not to set any content header
  433. processData: false, // Not to process data
  434. success: function (response) {
  435. if (response.ErrorCode == "1") {
  436. alert(response.Msg);
  437. return false;
  438. } else {
  439. if (addType.toLowerCase() == "s") {
  440. CallBack(response.Id);
  441. }
  442. else {
  443. var hide = $("#<%=hideSearchDivVal.ClientID%>").val();
  444. var dataSender = response.Extra2.split('|');
  445. if ($("#<%=hideBenificialId.ClientID%>").val() === '' || $("#<%=hideBenificialId.ClientID%>").val() === 'undefined') {
  446. if ($("#isFromPhone").prop("checked") === true) {
  447. window.location.href = "/AgentNew/Administration/CustomerSetup/SavePDF/SavePDFReceiver.aspx?customerId=" + dataSender[0] + "&receiverId=" + response.Id + "&membershipId=" + dataSender[1];
  448. return;
  449. }
  450. }
  451. if (hide == "true") {
  452. window.location.href = "List.aspx?customerDetails=true&customerId=" + response.Extra + "&hideSearchDiv=true";
  453. } else {
  454. window.location.href = "List.aspx?customerDetails=true&customerId=" + response.Extra + "";
  455. }
  456. return;
  457. }
  458. return true;
  459. }
  460. },
  461. error: function (error) {
  462. alert("Something went wrong!!!");
  463. return false;
  464. }
  465. })
  466. }
  467. var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
  468. function CallBack(res) {
  469. window.returnValue = res;
  470. if (isChrome) {
  471. window.opener.PostMessageToParentAddReceiver(window.returnValue);
  472. }
  473. window.close();
  474. }
  475. </script>
  476. </asp:Content>
  477. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  478. <asp:HiddenField ID="hideSearchDivVal" runat="server" />
  479. <asp:UpdatePanel ID="up1" runat="server">
  480. <ContentTemplate>
  481. <div class="page-wrapper">
  482. <div class="row">
  483. <div class="col-sm-12">
  484. <div class="page-title">
  485. <h1></h1>
  486. </div>
  487. </div>
  488. </div>
  489. <div class="report-tab" runat="server" id="regUp">
  490. <!-- Nav tabs -->
  491. <div class="listtabs">
  492. <ul class="nav nav-tabs" role="tablist">
  493. <li role="presentation" runat="server" id="receiverList"><a href="List.aspx?customerId=<%=hideCustomerId.Value %>&hideSearchDiv=<%=hideSearchDivVal.Value %>">Beneficiary List</a></li>
  494. <li class="active"><a href="Manage.aspx?receiverId=<%=hideBenificialId.Value %>&customerId=<%=hideCustomerId.Value %>&hideSearchDiv=<%=hideSearchDivVal.Value %>">Beneficiary Setup </a></li>
  495. </ul>
  496. </div>
  497. <div class="tab-content">
  498. <div role="tabpanel" class="tab-pane" id="List">
  499. </div>
  500. <div role="tabpanel" id="Manage">
  501. <div class="row">
  502. <div class="col-sm-12 col-md-12">
  503. <div class="register-form">
  504. <div class="panel panel-default clearfix m-b-20">
  505. <div class="panel-heading">
  506. <h4 class="panel-title">Beneficiary Setup:
  507. <label id="txtCustomerName" runat="server"></label>
  508. (<label><%=hideMembershipId.Value %></label>) </h4>
  509. </div>
  510. <div class="panel-body">
  511. <div class="row">
  512. <div class="col-md-12" id="msgDiv" runat="server" visible="false" style="background-color: red;">
  513. <asp:Label ID="msgLabel" runat="server" ForeColor="White"></asp:Label>
  514. </div>
  515. <p class="col-md-12"><b>Receiver Details</b></p>
  516. </div>
  517. <%--body part--%>
  518. <asp:HiddenField ID="hideCustomerId" runat="server" />
  519. <asp:HiddenField ID="hideBenificialId" runat="server" />
  520. <asp:HiddenField ID="hideMembershipId" runat="server" />
  521. <div class="row">
  522. <div class="col-md-4">
  523. <div class="form-group">
  524. <label>Country:<span class="errormsg">*</span></label>
  525. <asp:DropDownList ID="ddlCountry" CssClass="form-control" runat="server">
  526. <asp:ListItem Text="Select.."></asp:ListItem>
  527. </asp:DropDownList>
  528. </div>
  529. </div>
  530. <div class="col-md-4">
  531. <div class="form-group">
  532. <label>Beneficiary Type:<span class="errormsg">*</span></label>
  533. <asp:DropDownList ID="ddlBenificiaryType" CssClass="form-control" runat="server">
  534. </asp:DropDownList>
  535. </div>
  536. </div>
  537. <div class="col-md-4" style="display: none">
  538. <div class="form-group">
  539. <label>Email:</label>
  540. <asp:TextBox ID="txtEmail" TextMode="Email" runat="server" CssClass="form-control"></asp:TextBox>
  541. <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
  542. ErrorMessage="Invalid Email Id!" ForeColor="Red" SetFocusOnError="True" ValidationGroup="send"
  543. ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="inv"
  544. ControlToValidate="txtEmail"></asp:RegularExpressionValidator>
  545. </div>
  546. </div>
  547. <div class="col-md-4">
  548. <div class="form-group" style="overflow: initial;">
  549. <label>Mobile No.: <span class="errormsg">*</span></label><br />
  550. <asp:TextBox runat="server" MaxLength="16" ID="txtSenderMobileNo" placeholder="Mobile No" CssClass="form-control" />
  551. </div>
  552. </div>
  553. <div class="col-md-4">
  554. <div class="form-group">
  555. <label>First Name:<span class="errormsg">*</span></label>
  556. <asp:TextBox runat="server" ID="txtReceiverFName" CssClass="form-control" placeholder="Receiver First Name"></asp:TextBox>
  557. </div>
  558. </div>
  559. <div class="col-md-4">
  560. <div class="form-group">
  561. <label>Mid Name:</label>
  562. <asp:TextBox runat="server" ID="txtReceiverMName" CssClass="form-control" placeholder="Receiver Mid Name"></asp:TextBox>
  563. </div>
  564. </div>
  565. <div class="col-md-4">
  566. <div class="form-group">
  567. <label>Last Name:<span class="errormsg">*</span></label>
  568. <asp:TextBox runat="server" ID="txtReceiverLName" CssClass="form-control" placeholder="Receiver Last Name"></asp:TextBox>
  569. </div>
  570. </div>
  571. </div>
  572. <div class="row">
  573. <div class="col-md-4">
  574. <div class="form-group">
  575. <label>Native Country :<span class="errormsg">*</span></label>
  576. <asp:DropDownList ID="ddlNativeCountry" CssClass="form-control" runat="server">
  577. </asp:DropDownList>
  578. </div>
  579. </div>
  580. <div class="col-md-4">
  581. <div class="form-group">
  582. <label>Receiver Address:<span class="errormsg">*</span></label>
  583. <asp:TextBox runat="server" ID="txtReceiverAddress" CssClass="form-control" placeholder="Receiver Address"></asp:TextBox>
  584. </div>
  585. </div>
  586. <div class="col-md-4">
  587. <div class="form-group">
  588. <label>Receiver City:</label>
  589. <asp:TextBox runat="server" ID="txtReceiverCity" CssClass="form-control" placeholder="Receiver City"></asp:TextBox>
  590. </div>
  591. </div>
  592. </div>
  593. <div class="row">
  594. <div class="col-md-4" style="display: none">
  595. <div class="form-group">
  596. <label>Contact No:</label>
  597. <asp:TextBox runat="server" ID="txtContactNo" CssClass="form-control" placeholder="Receiver Contact No" MaxLength="15" onchange="return CheckForPhoneNumber(this,'Phone No.')"></asp:TextBox>
  598. </div>
  599. </div>
  600. <div class="col-md-4">
  601. <div class="form-group">
  602. <label>Id Type:</label>
  603. <asp:DropDownList ID="ddlIdType" CssClass="form-control" runat="server">
  604. </asp:DropDownList>
  605. </div>
  606. </div>
  607. </div>
  608. <div class="row">
  609. <div class="col-md-4">
  610. <label>Id Number:<span class="errormsg" id="idNumberErr" runat="server" hidden>*</span></label>
  611. <div class="form-group">
  612. <asp:TextBox runat="server" ID="txtIdValue" CssClass="form-control" placeholder="Any Photo Id" disabled="disabled"></asp:TextBox>
  613. </div>
  614. </div>
  615. <div class="col-md-4">
  616. <div class="form-group">
  617. <label>Place of Issue:</label>
  618. <asp:TextBox runat="server" ID="txtPlaceOfIssue" CssClass="form-control" placeholder="Place Of Issue"></asp:TextBox>
  619. </div>
  620. </div>
  621. <div class="col-md-4">
  622. <div class="form-group">
  623. <label>Relationship To Beneficiary:</label>
  624. <asp:DropDownList ID="ddlRelationship" onChange="showTextBox()" CssClass="form-control" runat="server">
  625. </asp:DropDownList>
  626. </div>
  627. </div>
  628. </div>
  629. <div class="row">
  630. <div class="col-md-4">
  631. <div class="form-group" id="otherRelationDiv" runat="server">
  632. <label>Description of other relationship:</label>
  633. <asp:TextBox runat="server" ID="otherRelationshipTextBox" CssClass="form-control" placeholder="Other Relation Description"></asp:TextBox>
  634. </div>
  635. </div>
  636. </div>
  637. <div class="row">
  638. <div class="clearfix"></div>
  639. <p class="col-md-12">
  640. <br />
  641. <label class="">Transaction Information</label>
  642. </p>
  643. </div>
  644. <div class="row">
  645. <div class="col-md-4">
  646. <div class="form-group">
  647. <label>Purpose of Remitance:</label>
  648. <asp:DropDownList ID="ddlPurposeOfRemitance" runat="server" CssClass="form-control">
  649. </asp:DropDownList>
  650. </div>
  651. </div>
  652. <div class="col-md-4" id="otherPurposeDiv" runat="server" style="display: none;">
  653. <div class="form-group">
  654. <label>Purpose of Remitance Other:</label>
  655. <asp:TextBox ID="purposeOther" runat="server" CssClass="form-control">
  656. </asp:TextBox>
  657. </div>
  658. </div>
  659. <div class="col-md-4">
  660. <div class="form-group">
  661. <label>Payment Mode:<span class="errormsg">*</span></label>
  662. <asp:DropDownList ID="ddlPaymentMode" runat="server" CssClass="form-control" onchange="PopulatePayoutPartner()">
  663. </asp:DropDownList>
  664. </div>
  665. </div>
  666. <div class="col-md-4">
  667. <div class="form-group">
  668. <label>Agent/Bank:</label>
  669. <asp:DropDownList ID="ddlPayoutPatner" runat="server" CssClass="form-control">
  670. </asp:DropDownList>
  671. </div>
  672. </div>
  673. </div>
  674. <div class="row">
  675. <div class="col-md-4" hidden="hidden">
  676. <div class="form-group">
  677. <label>Agent/Bank:<span><i>Type if Not Found</i></span></label>
  678. <asp:TextBox ID="txtBankName" runat="server" CssClass="form-control clearOnNotBank"></asp:TextBox>
  679. </div>
  680. </div>
  681. <div class="col-md-4 showOnBankMethod" id="receiverAccountNo" runat="server">
  682. <div class="form-group">
  683. <label id="beneficiaryAccount" runat="server">Beneficiary A/c #:</label>
  684. <asp:TextBox ID="txtBenificaryAc" runat="server" CssClass="form-control clearOnNotBank"></asp:TextBox>
  685. </div>
  686. </div>
  687. <div class="col-md-4" id="agentBankBranchDiv" runat="server">
  688. <div class="form-group">
  689. <label>Agent/Bank Branch:</label>
  690. <asp:DropDownList ID="DDLBankBranch" runat="server" CssClass="form-control">
  691. </asp:DropDownList>
  692. </div>
  693. </div>
  694. <div id="goodsInfoDiv" style="display: none;" runat="server">
  695. <div class="col-md-4">
  696. <div class="form-group">
  697. <label>Goods Type </label>
  698. <asp:TextBox ID="goodsType" runat="server" CssClass="form-control" placeholder="Species, Mobile, etc"></asp:TextBox>
  699. </div>
  700. </div>
  701. <div class="col-md-4">
  702. <div class="form-group">
  703. <label>Place of Origin </label>
  704. <asp:TextBox ID="goodsOrigin" runat="server" CssClass="form-control" placeholder="Nepal, India, China, etc"></asp:TextBox>
  705. </div>
  706. </div>
  707. <div class="col-md-4">
  708. <div class="form-group">
  709. <label>Port of Shipment </label>
  710. <asp:TextBox ID="portOfShipment" runat="server" CssClass="form-control " placeholder="Nepal, India, China, etc"></asp:TextBox>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. <div class="row">
  716. <div class="col-md-12">
  717. <div class="form-group">
  718. <label>Remarks:</label>
  719. <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine" Rows="2" CssClass="form-control"></asp:TextBox>
  720. </div>
  721. </div>
  722. <div class="col-md-12" id="isFromPhoneDiv" runat="server">
  723. <div class="form-group">
  724. <label class="checkbox-ui">
  725. <input type="checkbox" id="isFromPhone" name="isFromPhone" required="required" />
  726. <small>
  727. <label for="isFromPhone">Customer Requested by phone (For Furikomi Transaction)</label>
  728. </small>
  729. </label>
  730. </div>
  731. </div>
  732. </div>
  733. <%--End body part--%>
  734. </div>
  735. </div>
  736. <%-- <div class="panel panel-default clearfix m-b-20" id="customerDocument">
  737. <div class="panel-heading">Document Information</div>
  738. <div class="panel-body">
  739. <div class="col-md-6">
  740. <div class="form-group">
  741. <label id="lblreg_front_id">
  742. <asp:Localize runat="server" meta:resourcekey="Register_040" Text="Add Beneficiary Form"></asp:Localize><span runat="server" id="requiredClass" class="errormsg1">*</span></label>
  743. <div class="img-sample" style="display: none;">
  744. <label>
  745. <asp:Localize runat="server" meta:resourcekey="Register_041" Text="Sample Image"></asp:Localize></label>
  746. <div class="samp-control">
  747. <img src="/AgentNew/Img/alien-reg-front.jpg" alt="sample image" id="idImg1" />
  748. <div class="enlarge">
  749. <img src="/AgentNew/Img/alien-reg-front.jpg" alt="sample image" id="idImg2" />
  750. </div>
  751. </div>
  752. </div>
  753. <div class="file-upload" id="beneficiaryReg">
  754. <asp:FileUpload ID="beneficiary_reg" type="file" runat="server" class="uploadbutton required" accept="image/capture" capture="camera" />
  755. <span>
  756. <asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span>
  757. <asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize>
  758. </span>
  759. </div>
  760. </div>
  761. </div>
  762. </div>
  763. </div>--%>
  764. <div class="col-sm-12" runat="server">
  765. <div class="form-group">
  766. <asp:Button ID="register" runat="server" CssClass="btn btn-primary m-t-25" Text="Submit" />
  767. <%--<asp:Button ID="register" runat="server" CssClass="btn btn-primary m-t-25" Text="Submit" OnClientClick="return CheckFormValidation()" />--%>
  768. </div>
  769. </div>
  770. </div>
  771. </div>
  772. </div>
  773. </div>
  774. </div>
  775. </div>
  776. </div>
  777. </div>
  778. </ContentTemplate>
  779. </asp:UpdatePanel>
  780. <script>
  781. $(document).ready(function () {
  782. //$('#ContentPlaceHolder1_beneficiary_reg').on('change', function (e) {
  783. // $('.loadImg').remove();
  784. // ValidateExtensionForOtherDoc('ContentPlaceHolder1_beneficiary_reg');
  785. // // console.log(e.target, 'e')
  786. // for (var i = 0; i < e.target.files.length; i++) {
  787. // var tmppath = URL.createObjectURL(e.target.files[i]);
  788. // $(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>');
  789. // $(".loadImg img").fadeIn("fast");
  790. // }
  791. //});
  792. var a = $("#<%=hideSearchDivVal.ClientID%>").val();
  793. if (a == "true") {
  794. $("#<%=hideSearchDivVal.ClientID%>").hide();
  795. $('.main-nav').hide();
  796. }
  797. $("#<%=txtSenderMobileNo.ClientID%>").intlTelInput({
  798. nationalMode: true,
  799. formatOnDisplay: false,
  800. utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.3/js/utils.js" // just for formatting/placeholders etc
  801. });
  802. $("#<%=txtSenderMobileNo.ClientID%>").on("change", function () {
  803. var input = $("#<%=txtSenderMobileNo.ClientID%>");
  804. var mobileNo = input.val();
  805. var countryCode = $('.country.active .dial-code').text();
  806. var maxLength = input.attr('maxLength');
  807. if (mobileNo.indexOf(countryCode) < 0) {
  808. mobileNo = countryCode + mobileNo;
  809. }
  810. if (mobileNo.length > maxLength) {
  811. alert('Mobile No. Can allow input maxmum ' + maxLength + ' digit only');
  812. return $(this).val('');
  813. }
  814. $(this).val(mobileNo);
  815. CheckForMobileNumber(this, 'Mobile No.');
  816. });
  817. PopulateCountryFlagForMobileNumber();
  818. $('#<%=ddlCountry.ClientID%>').on('change', function () {
  819. <%-- $("#<%=txtSenderMobileNo.ClientID%>").val('');--%>
  820. PopulateCountryFlagForMobileNumber();
  821. PopulatePaymentMethod();
  822. PopulatePayoutPartner();
  823. });
  824. });
  825. function PopulateCountryFlagForMobileNumber() {
  826. $('#<%=txtSenderMobileNo.ClientID%>').attr('disabled', 'disabled');
  827. var getCountry = $("#<%=ddlCountry.ClientID%> option:selected").text();
  828. var countryId = $("#<%=ddlCountry.ClientID%> option:selected").val();
  829. if (countryId === "" || countryId === null || countryId === "0") {
  830. return;
  831. }
  832. $('#<%=txtSenderMobileNo.ClientID%>').removeAttr('disabled');
  833. var code = getCountry.split('(');
  834. code = code[1].split(')')[0];
  835. $("#<%=txtSenderMobileNo.ClientID%>").intlTelInput('setCountry', code);
  836. if ('<%=GetReceiverId() %>' != '') {
  837. CheckMobileNumberorCountryCode();
  838. }
  839. }
  840. function CheckMobileNumberorCountryCode() {
  841. var input = $("#<%=txtSenderMobileNo.ClientID%>");
  842. var mobileNo = input.val();
  843. var newMobile = '';
  844. if (mobileNo.indexOf('+') >= 0 || mobileNo === '') {
  845. return true;
  846. }
  847. if (mobileNo != '') {
  848. var countryCode = $('.country.active .dial-code').text();
  849. var len = countryCode.length;
  850. var firstletters = mobileNo.substring(0, len - 1);
  851. var codeWithoutPlus = countryCode.replace('+', '');
  852. if (codeWithoutPlus === firstletters) {
  853. newMobile = '+' + mobileNo;
  854. }
  855. else {
  856. newMobile = countryCode + mobileNo;
  857. }
  858. $("#<%=txtSenderMobileNo.ClientID%>").val(newMobile);
  859. }
  860. }
  861. </script>
  862. </asp:Content>