Browse Source

Task #17305 Implementation of Zipcode customer screens

Prod
shakun 1 year ago
parent
commit
d2ac968a8c
  1. 395
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx
  2. 58
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs
  3. 27
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs
  4. 371
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx
  5. 76
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.cs
  6. 46
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.designer.cs

395
Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx

@ -3,8 +3,6 @@
<%@ Register Src="~/Component/AutoComplete/SwiftTextBox.ascx" TagName="SwiftTextBox" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link href="../../../css/signature-pad.css" rel="stylesheet" />
<script src="/js/CustomerSignatureForAdmin.js"></script>
<style>
.intl-tel-input {
width: 100% !important;
@ -22,16 +20,77 @@
padding-left: 10px;
}
table#ContentPlaceHolder1_rbMobileLogin tbody tr td {
table#ContentPlaceHolder1_rbMobileLogin tbody tr td {
padding-left: 10px;
}
.errormsg1 {
font-size: 12px;
color: #FA4345;
}
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
margin-top: 170px;
}
}
</style>
<script>
<script type="text/javascript">
$(document).ready(function () {
$('#btnSearch').click(function () {
clearPopupData();
var zipCode = $('#ContentPlaceHolder1_zipCode').val();
if (zipCode == "" || zipCode == null) {
alert("Post Code cannot be empty");
return;
}
debugger;
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
url: 'Manage.aspx/GetAddressByPostCode',
data: JSON.stringify({ zipCode: zipCode }),
dataType: 'json',
success: function (response) {
var data = JSON.parse(response.d);
$('#apiDataPopup').modal({ backdrop: 'static', keyboard: false }, 'show');
$('#apiDataBody tbody').empty();
if (data && data.Data && data.Data.Addresses) {
var addresses = data.Data.Addresses;
addresses.forEach(function (item, index) {
var row = $('<tr>');
row.append($('<td>').text(index + 1));
row.append($('<td>').text(item.Address1));
row.append($('<td>').text(item.Address2));
var selectButton = $('<button>')
.addClass('btn btn-primary')
.text('Select')
.click(function () {
$('#ContentPlaceHolder1_txtAdditionalAddress').val(item.Address1);
$('#ContentPlaceHolder1_city').val(item.Address2);
$('#apiDataPopup').modal('hide');
});
row.append($('<td>').append(selectButton));
$('#apiDataBody').append(row);
});
$('#apiDataPopup').modal('show');
} else {
console.error("Invalid response.");
}
},
error: function (error) {
console.error(error);
}
});
});
$('#ContentPlaceHolder1_reg_front_id').on('change', function (e) {
$('.loadImg').remove();
ValidateExtension('ContentPlaceHolder1_reg_front_id');
@ -99,8 +158,6 @@
$(document).ready(function () {
//$("#ContentPlaceHolder1_occupation").prop("disabled", true);
$("#<%=verificationTypeNo.ClientID%>").on("change", function () {
var idtype = $("#<%=idType.ClientID%>").val();
@ -145,7 +202,7 @@
$("#<%=zipCode.ClientID%>").keyup(function () {
var len = $(this).val().length;
if (len == '7') {
GetAddressByZipCode();
GetAddressByPostCode();
}
});
<%-- $("#<%=zipCode.ClientID%>").keydown(function () {
@ -164,7 +221,7 @@
<% = txtSearchData.InitFunction() %>
});
$('#<%=ddlVisaStatus.ClientID%>').change(function () {
<%-- $('#<%=ddlVisaStatus.ClientID%>').change(function () {
var gen_emp_arr = ['official', 'professor', 'artist', 'religious activities', 'journalist', 'highly skilled professional', 'legal/accounting services'
, 'medical services', 'researcher', 'instructor', 'engineer/specialist in humanities/international services', 'intra-company transferee'
, 'nursing care', 'entertainer', 'skilled labor', 'technical intern training', 'permanent resident', 'spouse or child of japanese national'
@ -214,7 +271,7 @@
// $('#ContentPlaceHolder1_occupationHidden').val(11385);
// $('#ContentPlaceHolder1_occupation').val(11385);
//}
});
});--%>
$('#<%=occupation.ClientID%>').change(function () {
$('#ContentPlaceHolder1_occupationHidden').val($('#<%=occupation.ClientID%>').val());
@ -249,14 +306,7 @@
var countryCode = $('.dial-code').text();
var mobileNo = input.val();
var maxLength = input.attr('maxLength');
if (mobileNo.length > 10) {
alert('Mobile No. Can allow input maximum 10 digit only');
return false;
}
if (mobileNo.indexOf(countryCode) < 0) {
mobileNo = countryCode + mobileNo;
}
if (mobileNo.length > 13) {
alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only');
return $(this).val('');
@ -268,8 +318,8 @@
$('#<%=countryList.ClientID%>').on('change', function () {
$("#<%=mobile.ClientID%>").val('');
var country = $("#<%=countryList.ClientID%> option:selected").text();
if (country.toLowerCase() == 'japan') {
$("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'jp');
if (country.toLowerCase() == 'united kingdom') {
$("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'gb');
}
});
@ -309,10 +359,75 @@
$('input[name=agreement]').prop("checked", true);
$('#<%=register.ClientID%>').removeAttr('disabled');
});
CustomerSignatureFromAdmin();
//CustomerSignatureFromAdmin();
});
function clearPopupData() {
debugger;
/*$('#apiDataBody').empty();*/
$('#apiDataBody').html('');
$('#ContentPlaceHolder1_txtAdditionalAddress').val('');
$('#ContentPlaceHolder1_city').val('');
}
/* function pageLoad() {*/
//$('#btnSearch').click(function () {
// alert('hello');
// var zipCode = $('#ContentPlaceHolder1_zipCode').val();
// if (zipCode == "" || zipCode == null) {
// alert("Post Code cannot be empty");
// return;
// }
// debugger;
// $.ajax({
// type: 'POST',
// contentType: 'application/json; charset=utf-8',
// url: 'Manage.aspx/GetAddressByPostCode',
// data: JSON.stringify({ zipCode: zipCode }),
// dataType: 'json',
// success: function (response) {
// var data = JSON.parse(response.d);
// if (data && data.Data && data.Data.Addresses) {
// var addresses = data.Data.Addresses;
// $('#apiDataBody tbody').empty();
// addresses.forEach(function (item, index) {
// var row = $('<tr>');
// row.append($('<td>').text(index + 1));
// row.append($('<td>').text(item.Address1));
// row.append($('<td>').text(item.Address2));
// var selectButton = $('<button>')
// .addClass('btn btn-primary')
// .text('Select')
// .click(function () {
// $('#ContentPlaceHolder1_txtAdditionalAddress').val(item.Address1);
// $('#ContentPlaceHolder1_city').val(item.Address2);
// $('#apiDataPopup').modal('hide');
// });
// row.append($('<td>').append(selectButton));
// $('#apiDataBody').append(row);
// });
// $('#apiDataPopup').modal('show');
// } else {
// console.error("Invalid response.");
// }
// },
// error: function (error) {
// console.error(error);
// }
// });
//});
/*}*/
function IdTypeValidity() {
var senIdType = $("#<%=idType.ClientID%>").val();
@ -466,10 +581,10 @@
$('#<%=txtRegistrationNo.ClientID%>').val(dr[0].registerationNo);
$('#<%=txtDateOfIncorporation.ClientID%>').val(dr[0].dateofIncorporation);
$('#<%=txtNameofAuthoPerson.ClientID%>').val(dr[0].nameOfAuthorizedPerson);
//$('#<%=txtStreet.ClientID%>').val(dr[0].street);
<%--$('#<%=txtStreet.ClientID%>').val(dr[0].street);--%>
$('#<%=txtAdditionalAddress.ClientID%>').val(dr[0].additionalAddress);
$('#<%=txtsenderCityjapan.ClientID%>').val(dr[0].cityUnicode);
$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);
<%--$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);--%>
$('#<%=txtNameofEmployeer.ClientID%>').val(dr[0].nameOfEmployeer);
$('#<%=rbRemitanceAllowed.ClientID%> input[value=' + (dr[0].remittanceAllowed == true ? "Enabled" : "Disabled") + ']').attr('checked', 'checked');
@ -477,13 +592,13 @@
$('#<%=rbMobileLogin.ClientID%> [value= ' + (dr[0].mobileUser == "Y" ? "Enabled" : "Disabled") + ']').attr('checked', 'checked');
$('#<%=txtRemarks.ClientID%>').val(dr[0].remarks);
$('#<%=txtSSnNo.ClientID%>').val(dr[0].SSNNO);
$('#<%=ddlSalary.ClientID%>').val(dr[0].monthlyIncome);
<%--$('#<%=ddlSalary.ClientID%>').val(dr[0].monthlyIncome);--%>
$('#<%=ddlCustomerType.ClientID%>').val(dr[0].customerType);
$('#<%=ddlEmployeeBusType.ClientID%>').val(dr[0].employeeBusinessType);
$('#<%=ddlnatureOfCompany.ClientID%>').val(dr[0].natureOfCompany);
$('#<%=ddlOrganizationType.ClientID%>').val(dr[0].organizationType);
$('#<%=ddlPosition.ClientID%>').val(dr[0].position);
$('#<%=ddlVisaStatus.ClientID%>').val(dr[0].visaStatus);
<%--$('#<%=ddlVisaStatus.ClientID%>').val(dr[0].visaStatus);--%>
$('#<%=ddSourceOfFound.ClientID%>').val(dr[0].sourceOfFund);
$('#<%=ddlState.ClientID%>').val(dr[0].state);
$('#<%=ddlStateHidden.ClientID%>').val(dr[0].state);
@ -512,7 +627,7 @@
$('#<%=email.ClientID%>').attr('readonly', 'readonly');
}
//if edit customer the hide the option to select weather to create mobile user or not
// $("#chkSkipSpan").hide();
// $("#chkSkipSpan").hide();
$("#<%=email.ClientID%>").addClass("required");
$("#skipRequired").show();
@ -528,13 +643,14 @@
else
$('#lblCreatedFrom').text('Counter');
GetAddressByRowID(dr[0].district, dr[0].zipCode);
/*GetAddressByRowID(dr[0].district, dr[0].zipCode);*/
$("#ContentPlaceHolder1_referralText_aText").val(dr[0].REFERRAL_NAME);
$("#ContentPlaceHolder1_referralText_aValue").val(dr[0].REFERRAL_CODE);
}
}
function CheckFormValidation() {
debugger
var reqField = "";
var val = $("#<% =hdnCustomerId.ClientID%>").val();
var customerType = $("#<% =ddlCustomerType.ClientID%>").val();
@ -544,9 +660,6 @@
var countryCode = $('.dial-code').text();
var maxLength = input.attr('maxLength');
if (mobileNo.indexOf(countryCode) < 0) {
mobileNo = countryCode + mobileNo;
}
if (mobileNo.length > 13) {
alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only');
return $(this).val('');
@ -650,7 +763,7 @@
alert(msg);
}
function GetAddressByZipCode() {
<%--function GetAddressByZipCode() {
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var zipCodeValue = $("#<%=zipCode.ClientID%>").val();
$("#txtState").val('');
@ -666,7 +779,7 @@
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCodeValue, customerId: customerId, action:'LOAD' };
var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCodeValue, customerId: customerId, action: 'LOAD' };
$.post('/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx', dataToSend, function (erd) {
if (erd !== null) {
var dr = jQuery.parseJSON(erd);
@ -701,7 +814,7 @@
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
}--%>
function ShowIdTypeInfo() {
var idInfo = $('#<%=idType.ClientID%>').val();
@ -713,7 +826,7 @@
}
}
function GetAddressByRowID(rowId, zipCode) {
<%--function GetAddressByRowID(rowId, zipCode) {
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCode, RowID: rowId, customerId: customerId };
$.post('/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx', dataToSend, function (erd) {
@ -749,70 +862,70 @@
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
function PopulateAreaDDL(data, selectedValue) {
var option, selValue = '';
var editable = false;
if (selectedValue) {
selValue = selectedValue;
}
if (editable) {
$(".es-list").empty();
if (data.length > 1) {
$(".es-list").append('<li class="es-visible">Select Area</li>');
}
for (var i = 0; i < data.length; i++) {
if (data[i].SELECTED === 'Y') {
option = '<li value=' + data[i].ROW_ID + ' class="selected es-visible">' + data[i].STREET_NAME + '</li>';
}
else
option = '<li value=' + data[i].ROW_ID + ' class="es-visible" ">' + data[i].STREET_NAME + '</li>';
try {
$(".es-list").append(option);
}
catch (e) {
alert(e);
}
}
}
else {
var ddl = document.getElementById("ContentPlaceHolder1_txtStreet");
$(ddl).empty();
if (data.length > 1) {
option = document.createElement("option");
option.text = 'Select Area';
option.value = '';
ddl.options.add(option);
}
for (var i = 0; i < data.length; i++) {
option = document.createElement("option");
option.text = data[i].STREET_NAME;
option.value = data[i].ROW_ID;
if (data[i].SELECTED === 'Y') {
$('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME);
option.classList.add("selected");
option.selected = true;
}
else if (data.length == 1) {
$('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME);
}
try {
ddl.options.add(option);
}
catch (e) {
alert(e);
}
}
}
}
}--%>
//function PopulateAreaDDL(data, selectedValue) {
// var option, selValue = '';
// var editable = false;
// if (selectedValue) {
// selValue = selectedValue;
// }
// if (editable) {
// $(".es-list").empty();
// if (data.length > 1) {
// $(".es-list").append('<li class="es-visible">Select Area</li>');
// }
// for (var i = 0; i < data.length; i++) {
// if (data[i].SELECTED === 'Y') {
// option = '<li value=' + data[i].ROW_ID + ' class="selected es-visible">' + data[i].STREET_NAME + '</li>';
// }
// else
// option = '<li value=' + data[i].ROW_ID + ' class="es-visible" ">' + data[i].STREET_NAME + '</li>';
// try {
// $(".es-list").append(option);
// }
// catch (e) {
// alert(e);
// }
// }
// }
// else {
// var ddl = document.getElementById("ContentPlaceHolder1_txtStreet");
// $(ddl).empty();
// if (data.length > 1) {
// option = document.createElement("option");
// option.text = 'Select Area';
// option.value = '';
// ddl.options.add(option);
// }
// for (var i = 0; i < data.length; i++) {
// option = document.createElement("option");
// option.text = data[i].STREET_NAME;
// option.value = data[i].ROW_ID;
// if (data[i].SELECTED === 'Y') {
// $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME);
// option.classList.add("selected");
// option.selected = true;
// }
// else if (data.length == 1) {
// $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME);
// }
// try {
// ddl.options.add(option);
// }
// catch (e) {
// alert(e);
// }
// }
// }
//}
function CheckRequiredOrNot() {
var previousVerificationId = $("#<%=hddVerificationTypeNo.ClientID%>").val().toLowerCase();
@ -824,14 +937,19 @@
$(".errormsg1").hide();
}
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:HiddenField ID="hf_editable_townArea" runat="server" />
<asp:HiddenField ID="occupationHidden" runat="server" />
<asp:HiddenField ID="cityHidden" runat="server" />
<asp:HiddenField ID="ddlStateHidden" runat="server" />
<div class="page-wrapper">
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
@ -1017,36 +1135,43 @@
</asp:DropDownList>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Zip Code:<span class="errormsg">*</span> </label>
<asp:TextBox ID="zipCode" autocomplete="stopdoingthat" runat="server" placeholder="XXXXXXX" MaxLength="7" CssClass="form-control required" onchange="return GetAddressByZipCode();" />
<label>Post Code:<span class="errormsg">*</span> </label>
<div class="input-group">
<asp:TextBox ID="zipCode" runat="server" placeholder="XXXXXXX" MaxLength="8" CssClass="form-control required" />
<span class="input-group-btn">
<button id="btnSearch" class="btn btn-primary" type="button">Search</button>
</span>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Prefecture:<span class="errormsg">*</span></label>
<asp:DropDownList runat="server" ID="ddlState" disabled="disabled" CssClass="form-control required">
<asp:DropDownList runat="server" ID="ddlState" disabled="disabled">
</asp:DropDownList>
</div>
</div>
<div class="col-md-4 col-sm-4" style="display: none;">
<%--<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Street/Street[Japanese]:</label>
<asp:TextBox ID="txtstreetJapanese" autocomplete="stopdoingthat" runat="server" placeholder="Street[Japanese]" CssClass="form-control" />
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>City/Ward:<span class="errormsg">*</span></label>
<asp:TextBox ID="city" ReadOnly="true" autocomplete="stopdoingthat" runat="server" disabled="disabled" placeholder="City" CssClass="form-control required" />
<label>City:<span class="errormsg">*</span></label>
<asp:TextBox ID="city" ReadOnly="true" runat="server" disabled="disabled" placeholder="City" CssClass="form-control required" />
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Town Area:<span class="errormsg">*</span></label>
<asp:DropDownList ID="txtStreet" runat="server" placeholder="Street" CssClass="form-control required" />
<asp:DropDownList ID="txtStreet" runat="server" placeholder="Street" />
<%--<asp:TextBox ID="txtStreet" runat="server" placeholder="Street" CssClass="form-control required" />--%>
</div>
</div>
@ -1058,8 +1183,8 @@
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Street:<span class="errormsg">*</span> </label>
<asp:TextBox autocomplete="stopdoingthat" ID="txtAdditionalAddress" runat="server" placeholder="Additional address" CssClass="form-control required" />
<label>Address1:<span class="errormsg">*</span> </label>
<asp:TextBox ReadOnly="true" ID="txtAdditionalAddress" runat="server" placeholder="Additional address" CssClass="form-control required" />
</div>
</div>
@ -1084,7 +1209,7 @@
<div class="form-inline">
<div class="input-group input-append date dpYears">
<asp:TextBox runat="server" ID="dob" placeholder="YYYY/MM/DD" MaxLength="10" AutoComplete="off" onchange="return DateValidation('dob','dobnew')" CssClass="form-control clearOnOrganisation required"></asp:TextBox>
<%-- <asp:CustomValidator ID="CustomValidator1" runat="server" EnableClientScript="true"
<%-- <asp:CustomValidator ID="CustomValidator1" runat="server" EnableClientScript="true"
ControlToValidate="dob"
ErrorMessage="Date is Invalid"
ClientValidationFunction="ValidateDate"
@ -1130,13 +1255,13 @@
</div>
</div>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<%-- <div class="col-md-4 col-sm-4 hideForOrganisation" style="display: none;">
<div class="form-group">
<label>Visa Status<span class="errormsg">*</span></label>
<asp:DropDownList runat="server" ID="ddlVisaStatus" name="ddlVisaStatus" CssClass="form-control clearOnOrganisation required">
<asp:DropDownList runat="server" ID="ddlVisaStatus" name="ddlVisaStatus">
</asp:DropDownList>
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Employment Business Type:</label>
@ -1174,17 +1299,37 @@
<asp:DropDownList runat="server" ID="ddSourceOfFound" CssClass="form-control"></asp:DropDownList>
</div>
</div>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<%--<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Monthly Income:</label>
<asp:TextBox ID="ddlSalary" runat="server" placeholder="Monthly Income" CssClass="form-control clearOnOrganisation"></asp:TextBox>
<%-- <asp:DropDownList ID="ddlSalary" runat="server" CssClass="form-control clearOnOrganisation">
<asp:ListItem>JPY 0 - JPY170,000</asp:ListItem>
<asp:ListItem>JPY170,000 - JPY340,000</asp:ListItem>
<asp:ListItem>JPY340,000 - JPY680,000</asp:ListItem>
<asp:ListItem>JPY680,000 - JPY1,300,000</asp:ListItem>
<asp:ListItem>Above JPY1,300,000</asp:ListItem>
</asp:DropDownList>--%>
</div>
</div>--%>
</div>
<div id="apiDataPopup" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Address List</h4>
</div>
<div class="modal-body">
<table class="table table-bordered">
<thead>
<tr>
<th>SN</th>
<th>Address1</th>
<th>Address2</th>
<th>Action</th>
</tr>
</thead>
<tbody id="apiDataBody">
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@ -1204,7 +1349,7 @@
<div class="form-group">
<label id="otherVerificationType">Other Verification Id Type:<span class="errormsg">*</span></label>
<div class="input-group input-append date dpYears">
<asp:TextBox ID="otherVerificationTypeNo" runat="server" placeholder="Other Verification Id Type" MaxLength="30" CssClass="form-control required" />
<asp:TextBox ID="otherVerificationTypeNo" runat="server" placeholder="Other Verification Id Type" MaxLength="30" CssClass="form-control" />
<div class="input-group-addon" onclick="ShowIdTypeInfo();"><i class="fa fa-info"></i></div>
</div>
</div>
@ -1266,7 +1411,7 @@
</asp:RadioButtonList>
</div>
</div>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Mobile Login Allowed:<span class="errormsg">*</span></label>
<asp:RadioButtonList ID="rbMobileLogin" runat="server" CssClass="clearOnOrganisation"
@ -1276,7 +1421,7 @@
</asp:RadioButtonList>
</div>
</div>
<%-- <div class="col-md-3 col-sm-3 hideForOrganisation">
<%-- <div class="col-md-3 col-sm-3 hideForOrganisation">
<div class="form-group">
<label>KYC Type:<span class="errormsg">*</span></label>
<asp:RadioButtonList ID="rbKycType" runat="server" CssClass="clearOnOrganisation"

58
Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs

@ -1,4 +1,8 @@
using Swift.DAL.OnlineAgent;
using Newtonsoft.Json;
using Swift.API.Common.SyncModel;
using Swift.API.ThirdPartyApiServices;
using Swift.DAL.BL.System.Utility;
using Swift.DAL.OnlineAgent;
using Swift.DAL.SwiftDAL;
using Swift.web.Library;
using System;
@ -9,6 +13,7 @@ using System.Net;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
@ -52,10 +57,10 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
if (!IsPostBack)
{
PopulateDdl();
if (MethodName == "GetAddressDetailsByZipCode")
{
GetAddressDetailsByZipCode();
}
//if (MethodName == "GetAddressDetailsByZipCode")
//{
// GetAddressDetailsByZipCode();
//}
if (MethodName == "GetCustomerDetails")
{
GetCustomerDetails();
@ -135,17 +140,17 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
txtRegistrationNo.Text = dr["registerationNo"].ToString();
txtDateOfIncorporation.Text = dr["dateofIncorporation"].ToString();
txtNameofAuthoPerson.Text = dr["nameOfAuthorizedPerson"].ToString();
txtStreet.Text = dr["street"].ToString();
//txtStreet.Text = dr["street"].ToString();
txtAdditionalAddress.Text = dr["additionalAddress"].ToString();
txtsenderCityjapan.Text = dr["cityUnicode"].ToString();
txtstreetJapanese.Text = dr["streetUnicode"].ToString();
//txtstreetJapanese.Text = dr["streetUnicode"].ToString();
txtNameofEmployeer.Text = dr["nameOfEmployeer"].ToString();
rbRemitanceAllowed.SelectedValue = (dr["remittanceAllowed"].ToString().ToLower() == "true" ? "Enabled" : "Disabled");
rbOnlineLogin.SelectedValue = (dr["onlineUser"].ToString() == "Y" ? "Enabled" : "Disabled");
rbMobileLogin.SelectedValue = (dr["mobileUser"].ToString() == "Y" ? "Enabled" : "Disabled");
txtRemarks.Text = dr["remarks"].ToString();
txtSSnNo.Text = dr["SSNNO"].ToString();
ddlSalary.Text = dr["monthlyIncome"].ToString();
//ddlSalary.Text = dr["monthlyIncome"].ToString();
if (!string.IsNullOrEmpty(dr["customerType"].ToString()) && !string.IsNullOrWhiteSpace(dr["customerType"].ToString()))
{
ddlCustomerType.SelectedValue = dr["customerType"].ToString();
@ -163,7 +168,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
ddlOrganizationType.SelectedValue = dr["organizationType"].ToString();
}
ddlPosition.SelectedValue = dr["position"].ToString();
ddlVisaStatus.SelectedValue = dr["visaStatus"].ToString();
//ddlVisaStatus.SelectedValue = dr["visaStatus"].ToString();
ddSourceOfFound.SelectedValue = dr["sourceOfFund"].ToString();
setStateDll(countryList.SelectedValue, zipCode.Text, dr["state"].ToString());
email.Enabled = (dr["isTxnMade"].ToString() == "Y") ? false : true;
@ -200,13 +205,36 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
_sl.SetDDL(ref ddlnatureOfCompany, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7003", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddSourceOfFound, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=3900", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlEmployeeBusType, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7004", "valueId", "detailTitle", "", "");
_sl.SetDDL(ref ddlVisaStatus, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7005", "valueId", "detailTitle", "", "Select..");
//_sl.SetDDL(ref ddlVisaStatus, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7005", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlPosition, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7006", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlState, "EXEC proc_online_dropDownList @flag='state',@countryId='" + countryList.SelectedValue + "'", "stateId", "stateName", "", "Select..");
_sdd.SetDDL(ref ddlSearchBy, "exec proc_sendPageLoadData @flag='search-cust-by'", "VALUE", "TEXT", "", "");
_sdd.SetStaticDdl(ref ddlDocType, "7009", "", "Select");
}
[WebMethod]
public static string GetAddressByPostCode(string zipCode)
{
var postCode = zipCode.ToUpper();
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + postCode;
string methodType = Utility.ReadWebConfig("methodType", "");
string countryName = "United Kingdom";
AddressRequest requestObj = new AddressRequest()
{
CountryIsoCode = countryName,
ProviderId = ProcessId,
MethodType = methodType,
TownName = postCode,
};
SyncStateCityTownService serviceObj = new SyncStateCityTownService();
var response = serviceObj.GetAddressList(requestObj);
string jsonResponse = JsonConvert.SerializeObject(response);
return jsonResponse;
}
protected void register_Click(object sender, EventArgs e)
{
string eId = GetStatic.ReadQueryString("customerId", "");
@ -243,7 +271,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
string trimmedlastName = lastName.Text.Trim() == "" ? null : lastName.Text.Trim();
string occupationVal = occupationHidden.Value;
string street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"];
//string street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"];
OnlineCustomerModel customerModel = new OnlineCustomerModel()
{
@ -256,8 +284,8 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
country = countryList.Text,
address = addressLine1.Text,
zipCode = zipCode.Text,
streetJapanese = hf_editable_townArea.Value,
street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"],
//streetJapanese = hf_editable_townArea.Value,
//street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"],
AdditionalAddress = txtAdditionalAddress.Text,
city = cityHidden.Value,
state = ddlStateHidden.Value,
@ -265,7 +293,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
email = email.Text,
homePhone = phoneNumber.Text,
mobile = mobile.Text,
visaStatus = ddlVisaStatus.SelectedValue,
//visaStatus = ddlVisaStatus.SelectedValue,
employeeBusinessType = ddlEmployeeBusType.SelectedValue,
nativeCountry = nativeCountry.SelectedValue,
dob = dob.Text,
@ -292,7 +320,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
nameofAuthoPerson = txtNameofAuthoPerson.Text,
nameofEmployeer = txtNameofEmployeer.Text,
companyName = txtCompanyName.Text,
MonthlyIncome = ddlSalary.Text.ToUpper(),
//MonthlyIncome = ddlSalary.Text.ToUpper(),
IsCounterVisited = customerCounterVisit.Checked ? "Y" : "N",
customerPassword = customerPassword.Text,
agentId = GetStatic.GetAgent().ToInt(),

27
Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs

@ -365,15 +365,6 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlState;
/// <summary>
/// txtstreetJapanese control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtstreetJapanese;
/// <summary>
/// city control.
/// </summary>
@ -491,15 +482,6 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox mobile;
/// <summary>
/// ddlVisaStatus control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlVisaStatus;
/// <summary>
/// ddlEmployeeBusType control.
/// </summary>
@ -554,15 +536,6 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddSourceOfFound;
/// <summary>
/// ddlSalary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox ddlSalary;
/// <summary>
/// idType control.
/// </summary>

371
Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx

@ -25,18 +25,13 @@
<script src="/js/swift_grid.js" type="text/javascript"> </script>
<script src="/js/swift_calendar.js" type="text/javascript"></script>
<script src="/ui/js/jquery.validate.js" type="text/javascript"></script>
<script src="/js/popper/popper.min.js"></script>
<script src="/js/swift_autocomplete.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.3/js/intlTelInput.min.js"></script>
<script src="/AgentNew/js/swift_calender.js"></script>
<script src="/AgentNew/js/signature_pad.umd.js"></script>
<script src="/js/CustomerSignatureForAdmin.js"></script>
<script src="/ui/js/Editable/jquery-editable-select.min.js"></script>
<link href="/ui/js/Editable/jquery-editable-select.min.css" rel="stylesheet" />
@ -56,8 +51,63 @@
}
</style>
<script>
<script type="text/javascript">
$(document).ready(function () {
$('#btnSearch').click(function () {
clearPopupData();
var zipCode = $('#zipCode').val();
if (zipCode == "" || zipCode == null) {
alert("Post Code cannot be empty");
return;
}
debugger;
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
url: 'Manage.aspx/GetAddressByPostCode',
data: JSON.stringify({ zipCode: zipCode }),
dataType: 'json',
success: function (response) {
var data = JSON.parse(response.d);
$('#apiDataPopup').modal({ backdrop: 'static', keyboard: false }, 'show');
$('#apiDataBody tbody').empty();
if (data && data.Data && data.Data.Addresses) {
var addresses = data.Data.Addresses;
addresses.forEach(function (item, index) {
var row = $('<tr>');
row.append($('<td>').text(index + 1));
row.append($('<td>').text(item.Address1));
row.append($('<td>').text(item.Address2));
var selectButton = $('<button>')
.addClass('btn btn-primary')
.text('Select')
.click(function () {
$('#txtAdditionalAddress').val(item.Address1);
$('#city').val(item.Address2);
$('#apiDataPopup').modal('hide');
});
row.append($('<td>').append(selectButton));
$('#apiDataBody').append(row);
});
$('#apiDataPopup').modal('show');
} else {
console.error("Invalid response.");
}
},
error: function (error) {
console.error(error);
}
});
});
$('#reg_front_id').on('change', function (e) {
$('.loadImg').remove();
ValidateExtension('reg_front_id');
@ -170,7 +220,7 @@
$("#<%=zipCode.ClientID%>").keyup(function () {
var len = $(this).val().length;
if (len == '7') {
GetAddressByZipCode();
GetAddressByPostCode();
}
});
<%-- $("#<%=zipCode.ClientID%>").keydown(function () {
@ -189,7 +239,7 @@
<% = txtSearchData.InitFunction() %>
});
$('#<%=ddlVisaStatus.ClientID%>').change(function () {
<%--$('#<%=ddlVisaStatus.ClientID%>').change(function () {
var gen_emp_arr = ['official', 'professor', 'artist', 'religious activities', 'journalist', 'highly skilled professional', 'legal/accounting services'
, 'medical services', 'researcher', 'instructor', 'engineer/specialist in humanities/international services', 'intra-company transferee'
, 'nursing care', 'entertainer', 'skilled labor', 'technical intern training', 'permanent resident', 'spouse or child of japanese national'
@ -239,7 +289,7 @@
// $('#occupationHidden').val(11385);
// $('#occupation').val(11385);
//}
});
});--%>
$('#<%=occupation.ClientID%>').change(function () {
$('#divOccupation').hide();
@ -266,7 +316,7 @@
// mobile country code added
$("#<%=mobile.ClientID%>").intlTelInput({
nationalMode: true,
onlyCountries: ["jp"],
onlyCountries: ["gb"],
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.3/js/utils.js" // just for formatting/placeholders etc
});
@ -275,13 +325,13 @@
var countryCode = $('.dial-code').text();
var mobileNo = input.val();
var maxLength = input.attr('maxLength');
if (mobileNo.length > 10) {
alert('Mobile No. Can allow input maximum 10 digit only');
return $(this).val('');
}
if (mobileNo.indexOf(countryCode) < 0) {
mobileNo = countryCode + mobileNo;
}
//if (mobileNo.length > 10) {
// alert('Mobile No. Can allow input maximum 10 digit only');
// return $(this).val('');
//}
//if (mobileNo.indexOf(countryCode) < 0) {
// mobileNo = countryCode + mobileNo;
//}
if (mobileNo.length > 13) {
alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only');
return $(this).val('');
@ -293,8 +343,8 @@
$('#<%=countryList.ClientID%>').on('change', function () {
$("#<%=mobile.ClientID%>").val('');
var country = $("#<%=countryList.ClientID%> option:selected").text();
if (country.toLowerCase() == 'japan') {
$("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'jp');
if (country.toLowerCase() == 'united kingdom') {
$("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'gb');
}
});
@ -326,7 +376,14 @@
CustomerSignatureFromAdmin();
});
function clearPopupData() {
debugger;
$('#apiDataBody').empty();
/*$('#apiDataBody').html('');*/
$('#txtAdditionalAddress').val('');
$('#city').val('');
}
function IdTypeValidity() {
var senIdType = $("#<%=idType.ClientID%>").val();
@ -480,10 +537,10 @@
$('#<%=txtRegistrationNo.ClientID%>').val(dr[0].registerationNo);
$('#<%=txtDateOfIncorporation.ClientID%>').val(dr[0].dateofIncorporation);
$('#<%=txtNameofAuthoPerson.ClientID%>').val(dr[0].nameOfAuthorizedPerson);
//$('#<%=txtStreet.ClientID%>').val(dr[0].street);
<%--$('#<%=txtStreet.ClientID%>').val(dr[0].street);--%>
$('#<%=txtAdditionalAddress.ClientID%>').val(dr[0].additionalAddress);
$('#<%=txtsenderCityjapan.ClientID%>').val(dr[0].cityUnicode);
$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);
<%--$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);--%>
$('#<%=txtNameofEmployeer.ClientID%>').val(dr[0].nameOfEmployeer);
$('#<%=rbRemitanceAllowed.ClientID%> input[value=' + (dr[0].remittanceAllowed == true ? "Enabled" : "Disabled") + ']').attr('checked', 'checked');
@ -491,15 +548,15 @@
$('#<%=rbMobileLogin.ClientID%> [value= ' + (dr[0].mobileUser == "Y" ? "Enabled" : "Disabled") + ']').attr('checked', 'checked');
$('#<%=txtRemarks.ClientID%>').val(dr[0].remarks);
$('#<%=txtSSnNo.ClientID%>').val(dr[0].SSNNO);
$('#<%=ddlSalary.ClientID%>').val(dr[0].monthlyIncome);
<%-- $('#<%=ddlSalary.ClientID%>').val(dr[0].monthlyIncome);--%>
$('#<%=ddlCustomerType.ClientID%>').val(dr[0].customerType);
$('#<%=ddlEmployeeBusType.ClientID%>').val(dr[0].employeeBusinessType);
$('#<%=ddlnatureOfCompany.ClientID%>').val(dr[0].natureOfCompany);
$('#<%=ddlOrganizationType.ClientID%>').val(dr[0].organizationType);
$('#<%=ddlPosition.ClientID%>').val(dr[0].position);
$('#<%=ddlVisaStatus.ClientID%>').val(dr[0].visaStatus);
<%--$('#<%=ddlVisaStatus.ClientID%>').val(dr[0].visaStatus);--%>
$('#<%=ddSourceOfFound.ClientID%>').val(dr[0].sourceOfFund);
$('#<%=ddlState.ClientID%>').val(dr[0].state);
<%-- $('#<%=ddlState.ClientID%>').val(dr[0].state);--%>
$('#<%=ddlStateHidden.ClientID%>').val(dr[0].state);
$('#<%=cityHidden.ClientID%>').val(dr[0].city);
@ -560,6 +617,7 @@
}
function CheckFormValidation() {
debugger
var reqField = "";
if ($('#<%=occupation.ClientID%>').val() !== '11383') {
reqField = reqField.replace(",<%=occupationText.ClientID%>,", ",");
@ -572,10 +630,6 @@
var countryCode = $('.dial-code').text();
var maxLength = input.attr('maxLength');
if (mobileNo.indexOf(countryCode) < 0) {
mobileNo = countryCode + mobileNo;
}
if (mobileNo.length > 13) {
alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only');
return $(this).val('');
@ -679,120 +733,6 @@
alert(msg);
}
function GetAddressByZipCode() {
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var zipCodeValue = $("#<%=zipCode.ClientID%>").val();
$("#txtState").val('');
$("#<%=txtStreet.ClientID%>").val('');
$("#<%=city.ClientID%>").val('');
$("#<%=txtsenderCityjapan.ClientID%>").val('');
$("#<%=txtstreetJapanese.ClientID%>").val('');
var zipCodePattern = /^\d{7}?$/;
test = zipCodePattern.test(zipCodeValue);
if (!test) {
$("#<%=zipCode.ClientID%>").val('');
$("#<%=zipCode.ClientID%>").focus();
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCodeValue, customerId: customerId, action: 'EDIT' };
$.post('', dataToSend, function (erd) {
if (erd !== null) {
var dr = jQuery.parseJSON(erd);
if (erd == false) {
$("#<%=ddlState.ClientID%>").val('');
$("#<%=txtStreet.ClientID%>").val('');
$("#<%=city.ClientID%>").val('');
$("#<%=zipCode.ClientID%>").focus();
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
//$("#tempAddress").html(erd);
if (dr[0].errorCode == '0') {
$("#<%=ddlState.ClientID%>").val(dr[0].STATE_ID);
$("#<%=ddlStateHidden.ClientID%>").val(dr[0].STATE_ID);
$("#<%=cityHidden.ClientID%>").val(dr[0].CITY_NAME);
//$("#<%=txtStreet.ClientID%>").val(dr[0].STREET_NAME);
$("#<%=city.ClientID%>").val(dr[0].CITY_NAME);
PopulateAreaDDL(dr);
}
else {
$("#<%=ddlState.ClientID%>").val('');
$("#<%=txtStreet.ClientID%>").val('');
$("#<%=city.ClientID%>").val('');
$("#<%=zipCode.ClientID%>").focus();
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
}
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
}).done(function () {
if (!$("#<%=txtStreet.ClientID%>").next('ul').hasClass('es-list')) {
$("#<%=txtStreet.ClientID%>").editableSelect({
effects: 'slide',
duration: 200,
filter: false
}).on('select.editable-select', function (e, li) {
$("#<%=hf_editable_townArea.ClientID%>").val(li.val());
$("#<%=txtStreet.ClientID%>").editableSelect('hide');
});
}
$("#<%=txtStreet.ClientID%>").editableSelect('select', $(".selected.es-visible"));
});
}
function GetAddressByRowID(rowId, zipCode) {
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var dataToSend = { MethodName: 'GetAddressDetailsByZipCode', zipCode: zipCode, RowID: rowId, customerId: customerId, action: 'LOAD' };
//$.post('/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx', dataToSend, function (erd) {
$.post('', dataToSend, function (erd) {
if (erd !== null) {
var dr = jQuery.parseJSON(erd);
if (erd == false) {
$("#<%=ddlState.ClientID%>").val('');
$("#<%=txtStreet.ClientID%>").val('');
$("#<%=city.ClientID%>").val('');
$("#<%=zipCode.ClientID%>").focus();
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
//$("#tempAddress").html(erd);
if (dr[0].errorCode == '0') {
$("#<%=ddlState.ClientID%>").val(dr[0].STATE_ID);
$("#<%=ddlStateHidden.ClientID%>").val(dr[0].STATE_ID);
$("#<%=cityHidden.ClientID%>").val(dr[0].CITY_NAME);
//$("#<%=txtStreet.ClientID%>").val(dr[0].STREET_NAME);
$("#<%=city.ClientID%>").val(dr[0].CITY_NAME);
PopulateAreaDDL(dr, rowId);
}
else {
$("#<%=ddlState.ClientID%>").val('');
$("#<%=txtStreet.ClientID%>").val('');
$("#<%=city.ClientID%>").val('');
$("#<%=zipCode.ClientID%>").focus();
$("#<%=zipCode.ClientID%>").attr("style", "display:block; background:#FFCCD2");
return alert("Please Enter Valid Zip Code(XXXXXXX)");
}
}
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
}).done(function () {
if (!$("#<%=txtStreet.ClientID%>").next('ul').hasClass('es-list')) {
$("#<%=txtStreet.ClientID%>").editableSelect({
effects: 'slide',
duration: 200,
filter: false
}).on('select.editable-select', function (e, li) {
$("#<%=hf_editable_townArea.ClientID%>").val(li.val());
$("#<%=txtStreet.ClientID%>").editableSelect('focus');
});
}
$("#<%=txtStreet.ClientID%>").editableSelect('select', $(".selected.es-visible"));
});
}
function ShowIdTypeInfo() {
var idInfo = $('#<%=idType.ClientID%>').val();
@ -807,7 +747,7 @@
parent.AgreementModalPopup();
}
function PopulateAreaDDL(data, selectedValue) {
<%--function PopulateAreaDDL(data, selectedValue) {
var option, selValue = '';
var editable = $("#<%=txtStreet.ClientID%>").next('ul').hasClass('es-list');
@ -864,7 +804,7 @@
}
}
}
}
}--%>
function CheckRequiredOrNot() {
var previousVerificationId = $("#<%=hddVerificationTypeNo.ClientID%>").val().toLowerCase();
var currentVerificationId = $("#<%=verificationTypeNo.ClientID%>").val().toLowerCase();
@ -876,6 +816,65 @@
}
}
//function pageLoad() {
// alert('');
// $('#btnSearch').click(function () {
// alert('');
// var zipCode = $('#zipCode').val();
// if (zipCode == "" || zipCode == null) {
// alert("Post Code cannot be empty");
// return;
// }
// debugger;
// $.ajax({
// type: 'POST',
// contentType: 'application/json; charset=utf-8',
// url: 'Manage.aspx/GetAddressByPostCode',
// data: JSON.stringify({ zipCode: zipCode }),
// //data: "{'zipCode':'" + zipCode + "'}",
// dataType: 'json',
// success: function (response) {
// //var dt = JSON.parse(data.d);
// $('#apiDataPopup').modal('show');
// $('#apiDataBody tbody').empty();
// if (data.d) {
// $('#apiDataPopup').modal('show');
// var addresses = response.d.Data.Addresses;
// addresses.forEach(function (item, index) {
// var row = $('<tr>');
// row.append($('<td>').text(index + 1));
// row.append($('<td>').text(item.Address2));
// row.append($('<td>').text(item.Address1));
// row.append($('<td>').text(item.City));
// var selectButton = $('<button>')
// .addClass('btn btn-primary')
// .text('Select')
// .click(function () {
// $('#city').val(item.Address1);
// $('#txtAdditionalAddress').val(item.Address2);
// $('#apiDataPopup').modal('hide');
// });
// row.append($('<td>').append(selectButton));
// $('#apiDataBody').append(row);
// });
// $('#apiDataPopup').modal('show');
// } else {
// console.error("Invalid response.");
// }
// },
// error: function (error) {
// console.error(error);
// }
// });
// });
//}
</script>
<style>
.intl-tel-input {
@ -893,9 +892,11 @@
table#ContentPlaceHolder1_rbOnlineLogin tbody tr td {
padding-left: 10px;
}
table#ContentPlaceHolder1_rbMobileLogin tbody tr td {
table#ContentPlaceHolder1_rbMobileLogin tbody tr td {
padding-left: 10px;
}
.signature-pad--body {
min-height: 180px;
}
@ -986,7 +987,7 @@
<label id="lblCreatedFrom" class="form-control" readonly="readonly"></label>
</div>
</div>
<div class="col-md-4 col-sm-4" hidden>
<div class="form-group">
<label>Confirm E-Mail ID:<span class="errormsg">*</span></label>
@ -1088,37 +1089,42 @@
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Zip Code:<span class="errormsg">*</span> </label>
<asp:TextBox ID="zipCode" runat="server" placeholder="XXXXXXX" MaxLength="7" CssClass="form-control required" onchange="return GetAddressByZipCode();" />
<label>Post Code:<span class="errormsg">*</span> </label>
<div class="input-group">
<asp:TextBox ID="zipCode" runat="server" placeholder="XXXXXXX" MaxLength="8" CssClass="form-control required" />
<span class="input-group-btn">
<button id="btnSearch" class="btn btn-primary m-t-25" type="button">Search</button>
</span>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<%--<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Prefecture:<span class="errormsg">*</span></label>
<asp:DropDownList runat="server" ID="ddlState" disabled="disabled" CssClass="form-control required">
</asp:DropDownList>
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4" style="display: none;">
<%--<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Street/Street[Japanese]:</label>
<asp:TextBox ID="txtstreetJapanese" runat="server" placeholder="Street[Japanese]" CssClass="form-control" />
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>City/Ward:<span class="errormsg">*</span></label>
<label>City:<span class="errormsg">*</span></label>
<asp:TextBox ID="city" ReadOnly="true" runat="server" disabled="disabled" placeholder="City" CssClass="form-control required" />
</div>
</div>
<div class="col-md-4 col-sm-4">
<%--<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Town Area:<span class="errormsg">*</span></label>
<asp:DropDownList ID="txtStreet" runat="server" placeholder="Street" CssClass="form-control required" />
<%--<asp:TextBox ID="txtStreet" runat="server" placeholder="Street" CssClass="form-control required" />--%>
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4" style="display: none;">
<div class="form-group">
<label>Sender City-Japan:</label>
@ -1127,8 +1133,8 @@
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Street:<span class="errormsg">*</span> </label>
<asp:TextBox ID="txtAdditionalAddress" runat="server" placeholder="Additional address" CssClass="form-control required" />
<label>Address1:<span class="errormsg">*</span> </label>
<asp:TextBox ID="txtAdditionalAddress" ReadOnly="true" runat="server" placeholder="Additional address" CssClass="form-control required" />
</div>
</div>
@ -1189,13 +1195,13 @@
</div>
</div>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<%--<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Visa Status<span class="errormsg">*</span></label>
<asp:DropDownList runat="server" ID="ddlVisaStatus" name="ddlVisaStatus" CssClass="form-control clearOnOrganisation required">
</asp:DropDownList>
</div>
</div>
</div>--%>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Employment Business Type:</label>
@ -1233,20 +1239,41 @@
<asp:DropDownList runat="server" ID="ddSourceOfFound" CssClass="form-control"></asp:DropDownList>
</div>
</div>
<div class="col-md-4 col-sm-4 hideForOrganisation">
<%--<div class="col-md-4 col-sm-4 hideForOrganisation">
<div class="form-group">
<label>Monthly Income:</label>
<asp:TextBox runat="server" ID="ddlSalary" CssClass="form-control clearOnOrganisation"></asp:TextBox>
<%-- <asp:DropDownList ID="ddlSalary" runat="server" CssClass="form-control clearOnOrganisation">
<asp:ListItem>JPY 0 - JPY170,000</asp:ListItem>
<asp:ListItem>JPY170,000 - JPY340,000</asp:ListItem>
<asp:ListItem>JPY340,000 - JPY680,000</asp:ListItem>
<asp:ListItem>JPY680,000 - JPY1,300,000</asp:ListItem>
<asp:ListItem>Above JPY1,300,000</asp:ListItem>
</asp:DropDownList>--%>
</div>
</div>--%>
</div>
<div id="apiDataPopup" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Address List</h4>
</div>
<div class="modal-body">
<table class="table table-bordered">
<thead>
<tr>
<th>SN</th>
<th>Address1</th>
<th>Address2</th>
<th>Action</th>
</tr>
</thead>
<tbody id="apiDataBody">
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default clearfix m-b-20">
<div class="panel-heading">Security Information</div>
@ -1263,7 +1290,7 @@
<div class="form-group">
<label id="otherVerificationType">Other Verification ID Type.:<span class="errormsg">*</span></label>
<div class="input-group input-append date dpYears">
<asp:TextBox ID="otherVerificationTypeNo" runat="server" placeholder="Other Verification Id Type" MaxLength="14" CssClass="form-control required" />
<asp:TextBox ID="otherVerificationTypeNo" runat="server" placeholder="Other Verification Id Type" MaxLength="14" CssClass="form-control" />
<div class="input-group-addon" onclick="ShowIdTypeInfo();"><i class="fa fa-info"></i></div>
</div>
</div>
@ -1323,7 +1350,7 @@
<asp:ListItem Text="Disabled" Value="Disabled" />
</asp:RadioButtonList>
</div>
</div>
</div>
<div class="col-md-3 col-sm-3 hideForOrganisation">
<div class="form-group">
<label>Mobile Login Allowed:<span class="errormsg">*</span></label>
@ -1334,7 +1361,7 @@
</asp:RadioButtonList>
</div>
</div>
<div class="col-md-3 col-sm-3 hideForOrganisation">
<%--<div class="col-md-3 col-sm-3 hideForOrganisation">
<div class="form-group">
<label>KYC Type:<span class="errormsg">*</span></label>
<asp:RadioButtonList ID="rbKycType" runat="server" CssClass="clearOnOrganisation"
@ -1343,7 +1370,7 @@
<asp:ListItem Text="MKYC(Manual KYC)" Value="MKYC" Selected="True" />
</asp:RadioButtonList>
</div>
</div>
</div>--%>
</div>
<div class="row">
<div class="col-md-6">

76
Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.cs

@ -1,4 +1,9 @@
using Swift.DAL.OnlineAgent;
using Newtonsoft.Json;
using Swift.API.Common;
using Swift.API.Common.SyncModel;
using Swift.API.ThirdPartyApiServices;
using Swift.DAL.BL.System.Utility;
using Swift.DAL.OnlineAgent;
using Swift.DAL.SwiftDAL;
using Swift.web.Library;
using System;
@ -9,6 +14,7 @@ using System.Net;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.CustomerRegistration
@ -56,10 +62,7 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
// divUploadImage.Visible = true;
PopulateDdl();
if (MethodName == "GetAddressDetailsByZipCode")
{
GetAddressDetailsByZipCode();
}
if (MethodName == "GetCustomerDetails")
{
GetCustomerDetails();
@ -161,18 +164,18 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
txtAdditionalAddress.Text = dr["additionalAddress"].ToString();
txtDateOfIncorporation.Text = dr["dateofIncorporation"].ToString();
txtNameofAuthoPerson.Text = dr["nameOfAuthorizedPerson"].ToString();
txtStreet.Text = dr["street"].ToString();
//txtStreet.Text = dr["street"].ToString();
txtsenderCityjapan.Text = dr["cityUnicode"].ToString();
txtstreetJapanese.Text = dr["streetUnicode"].ToString();
//txtstreetJapanese.Text = dr["streetUnicode"].ToString();
txtNameofEmployeer.Text = dr["nameOfEmployeer"].ToString();
rbRemitanceAllowed.SelectedValue = (dr["remittanceAllowed"].ToString().ToLower() == "true" ? "Enabled" : "Disabled");
rbOnlineLogin.SelectedValue = (dr["onlineUser"].ToString() == "Y" ? "Enabled" : "Disabled");
rbMobileLogin.SelectedValue = (dr["mobileUser"].ToString() == "Y" ? "Enabled" : "Disabled");
txtRemarks.Text = dr["remarks"].ToString();
txtSSnNo.Text = dr["SSNNO"].ToString();
ddlSalary.Text = dr["monthlyIncome"].ToString();
//ddlSalary.Text = dr["monthlyIncome"].ToString();
ddlDocType.SelectedValue = dr["documentType"].ToString();
rbKycType.SelectedValue = dr["RegistrationType"].ToString();
//rbKycType.SelectedValue = dr["RegistrationType"].ToString();
if (!string.IsNullOrEmpty(dr["customerType"].ToString()) && !string.IsNullOrWhiteSpace(dr["customerType"].ToString()))
{
ddlCustomerType.SelectedValue = dr["customerType"].ToString();
@ -190,9 +193,9 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
ddlOrganizationType.SelectedValue = dr["organizationType"].ToString();
}
ddlPosition.SelectedValue = dr["position"].ToString();
ddlVisaStatus.SelectedValue = dr["visaStatus"].ToString();
//ddlVisaStatus.SelectedValue = dr["visaStatus"].ToString();
ddSourceOfFound.SelectedValue = dr["sourceOfFund"].ToString();
setStateDll(countryList.SelectedValue, zipCode.Text, dr["state"].ToString());
//setStateDll(countryList.SelectedValue, zipCode.Text, dr["state"].ToString());
email.Enabled = (dr["isTxnMade"].ToString() == "Y") ? false : true;
emailConfirm.Enabled = (dr["isTxnMade"].ToString() == "Y") ? false : true;
hddTxnsMade.Value = dr["isTxnMade"].ToString();
@ -227,9 +230,9 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
_sl.SetDDL(ref ddlnatureOfCompany, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7003", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddSourceOfFound, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=3900", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlEmployeeBusType, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7004", "valueId", "detailTitle", "", "");
_sl.SetDDL(ref ddlVisaStatus, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7005", "valueId", "detailTitle", "", "Select..");
// _sl.SetDDL(ref ddlVisaStatus, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7005", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlPosition, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7006", "valueId", "detailTitle", "", "Select..");
_sl.SetDDL(ref ddlState, "EXEC proc_online_dropDownList @flag='state',@countryId='" + countryList.SelectedValue + "'", "stateId", "stateName", "", "Select..");
//_sl.SetDDL(ref ddlState, "EXEC proc_online_dropDownList @flag='state',@countryId='" + countryList.SelectedValue + "'", "stateId", "stateName", "", "Select..");
_sdd.SetDDL(ref ddlSearchBy, "exec proc_sendPageLoadData @flag='search-cust-by'", "VALUE", "TEXT", "", "");
_sdd.SetStaticDdl(ref ddlDocType, "7009", "", "Select");
}
@ -265,7 +268,7 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
GetStatic.AlertMessage(this, "Customer signature or customer password is required!");
return;
}
string a = Request.Form["txtStreet"];
string trimmedfirstName = firstName.Text.Trim() == "" ? null : firstName.Text.Trim();
string trimmedMiddleName = middleName.Text.Trim() == "" ? null : middleName.Text.Trim();
string trimmedlastName = lastName.Text.Trim() == "" ? null : lastName.Text.Trim();
@ -286,13 +289,13 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
zipCode = zipCode.Text,
street = hf_editable_townArea.Value,
city = cityHidden.Value,
state = ddlStateHidden.Value,
//state = ddlStateHidden.Value,
senderCityjapan = txtsenderCityjapan.Text,
email = email.Text,
streetJapanese = Request.Form["txtStreet"],
homePhone = phoneNumber.Text,
mobile = mobile.Text,
visaStatus = ddlVisaStatus.SelectedValue,
// visaStatus = ddlVisaStatus.SelectedValue,
employeeBusinessType = ddlEmployeeBusType.SelectedValue,
nativeCountry = nativeCountry.SelectedValue,
dob = dob.Text,
@ -319,7 +322,7 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
nameofAuthoPerson = txtNameofAuthoPerson.Text,
nameofEmployeer = txtNameofEmployeer.Text,
companyName = txtCompanyName.Text,
MonthlyIncome = ddlSalary.Text.ToUpper(),
//MonthlyIncome = ddlSalary.Text.ToUpper(),
IsCounterVisited = customerCounterVisit.Checked ? "Y" : "N",
customerPassword = customerPassword.Text,
DocumentType = ddlDocType.SelectedValue,
@ -328,7 +331,7 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
ReferralId = referralText.Value,
otherIdNumber = otherVerificationTypeNo.Text,
serviceUsedFor = Request.Form["chkSkip"],
RegistrationType = rbKycType.SelectedValue
//RegistrationType = rbKycType.SelectedValue
};
if (hdnCustomerId.Value != "")
@ -483,6 +486,29 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
public string Street { get; set; }
}
[WebMethod]
public static string GetAddressByPostCode(string zipCode)
{
var postCode = zipCode.ToUpper();
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + postCode;
string methodType = Utility.ReadWebConfig("methodType", "");
string countryName = "United Kingdom";
AddressRequest requestObj = new AddressRequest()
{
CountryIsoCode = countryName,
ProviderId = ProcessId,
MethodType = methodType,
TownName = postCode,
};
SyncStateCityTownService serviceObj = new SyncStateCityTownService();
var response = serviceObj.GetAddressList(requestObj);
string jsonResponse = JsonConvert.SerializeObject(response);
return jsonResponse;
}
private void GetAddressDetailsByZipCode()
{
string customerId = Request.Form["customerId"];
@ -527,13 +553,13 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
return json;
}
private void setStateDll(string countryId, string zipCode, string stateId)
{
if (countryId != "")
{
_sl.SetDDL(ref ddlState, "EXEC proc_online_dropDownList @flag='state',@countryId='" + countryList.SelectedValue + "'", "stateId", "stateName", stateId, "Select..");
}
}
//private void setStateDll(string countryId, string zipCode, string stateId)
//{
// if (countryId != "")
// {
// _sl.SetDDL(ref ddlState, "EXEC proc_online_dropDownList @flag='state',@countryId='" + countryList.SelectedValue + "'", "stateId", "stateName", stateId, "Select..");
// }
//}
public string GetFunctionIdByUserType(string functionIdAgent, string functionIdAdmin)
{

46
Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.designer.cs

@ -329,24 +329,6 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox zipCode;
/// <summary>
/// ddlState control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlState;
/// <summary>
/// txtstreetJapanese control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtstreetJapanese;
/// <summary>
/// city control.
/// </summary>
@ -356,15 +338,6 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox city;
/// <summary>
/// txtStreet control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList txtStreet;
/// <summary>
/// txtsenderCityjapan control.
/// </summary>
@ -464,15 +437,6 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox mobile;
/// <summary>
/// ddlVisaStatus control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlVisaStatus;
/// <summary>
/// ddlEmployeeBusType control.
/// </summary>
@ -527,15 +491,6 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddSourceOfFound;
/// <summary>
/// ddlSalary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox ddlSalary;
/// <summary>
/// idType control.
/// </summary>
@ -618,7 +573,6 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
protected global::System.Web.UI.WebControls.RadioButtonList rbMobileLogin;
/// <summary>
protected global::System.Web.UI.WebControls.RadioButtonList rbKycType;
/// ddlDocType control.
/// </summary>
/// <remarks>

Loading…
Cancel
Save