Browse Source

#17305 Implementation of Zipcode via locate api [admin /agent]

Ime-london-webcore
Leeza Baidar 1 year ago
parent
commit
7dfcfc7173
  1. 25
      Swift.API/Common/SyncModel/Town/Address.cs
  2. 3
      Swift.API/Swift.API.csproj
  3. 57
      Swift.API/ThirdPartyApiServices/SyncStateCityTownService.cs
  4. 2
      Swift.DAL/Swift.DAL.csproj
  5. 179
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx
  6. 48
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs
  7. 18
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs
  8. 324
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx
  9. 70
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.cs
  10. 28
      Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx.designer.cs
  11. 2
      Swift.web/Swift.web.csproj

25
Swift.API/Common/SyncModel/Town/Address.cs

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Swift.API.Common.SyncModel.Town
{
public class AddressResponse
{
public string Id { get; set; }
public string Type { get; set; }
public object Address1 { get; set; }
public string City { get; set; }
public object Address2 { get; set; }
}
public class AddressDTO
{
public List<AddressResponse> Addresses { get; set; }
}
}

3
Swift.API/Swift.API.csproj

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swift.API</RootNamespace>
<AssemblyName>Swift.API</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@ -102,6 +102,7 @@
<Compile Include="Common\SyncModel\City\CityResponse.cs" />
<Compile Include="Common\SyncModel\CommonRequest.cs" />
<Compile Include="Common\SyncModel\State\StateResponse.cs" />
<Compile Include="Common\SyncModel\Town\Address.cs" />
<Compile Include="Common\SyncModel\Town\TownResponse.cs" />
<Compile Include="Common\TFReleaseTxnRequest.cs" />
<Compile Include="Common\TPGetStatic.cs" />

57
Swift.API/ThirdPartyApiServices/SyncStateCityTownService.cs

@ -24,42 +24,47 @@ namespace Swift.API.ThirdPartyApiServices
var jbdContent = new StringContent(obj.ToString(), Encoding.UTF8, "application/json");
try
{
var URL = "api/v1/TP/addressList";
var URL = "http://77.68.15.91:1083/api/v1/TP/addressList";
HttpResponseMessage resp = client.PostAsync(URL, jbdContent).Result;
string resultData = resp.Content.ReadAsStringAsync().Result;
if (resp.IsSuccessStatusCode)
{
jsonResponse = JsonConvert.DeserializeObject<JsonResponse>(resultData);
dynamic a ;
if (model.MethodType.ToLower() == "state")
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<StateResponse>>(jsonResponse.Data.ToString()) : null);
}else if (model.MethodType.ToLower() == "city")
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<CityResponse>>(jsonResponse.Data.ToString()) : null);
}
else
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<TownResponse>>(jsonResponse.Data.ToString()) : null);
}
jsonResponse.Data = a;
return jsonResponse;
}
jsonResponse = JsonConvert.DeserializeObject<JsonResponse>(resultData);
dynamic a;
if (model.MethodType.ToLower() == "state")
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<StateResponse>>(jsonResponse.Data.ToString()) : null);
}
else if (model.MethodType.ToLower() == "city")
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<CityResponse>>(jsonResponse.Data.ToString()) : null);
}
else if (model.MethodType.ToLower() == "loqate")
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<AddressDTO>(jsonResponse.Data.ToString()) : null);
}
else
{
a = (jsonResponse.Data != null ? JsonConvert.DeserializeObject<List<TownResponse>>(jsonResponse.Data.ToString()) : null);
}
jsonResponse.Data = a;
return jsonResponse;
}
else
{
var errorJson = JsonConvert.DeserializeObject<ErrorJosn>(resultData);
var jsonResponseData = JsonConvert.DeserializeObject<JsonResponse>(errorJson.Message);
var data = JsonConvert.DeserializeObject<List<Data>>(jsonResponseData.Data.ToString());
jsonResponse.Id = jsonResponseData.Id;
jsonResponse.ResponseCode = jsonResponseData.ResponseCode;
jsonResponse.Msg = jsonResponseData.Msg;
jsonResponse.Data = data;
jsonResponse.Extra = jsonResponseData.Extra;
jsonResponse.Extra1 = jsonResponseData.Extra1;
return jsonResponse;
}
jsonResponse.Id = jsonResponseData.Id;
jsonResponse.ResponseCode = jsonResponseData.ResponseCode;
jsonResponse.Msg = jsonResponseData.Msg;
jsonResponse.Data = data;
jsonResponse.Extra = jsonResponseData.Extra;
jsonResponse.Extra1 = jsonResponseData.Extra1;
return jsonResponse;
}
}
catch (Exception ex)
{

2
Swift.DAL/Swift.DAL.csproj

@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swift.DAL</RootNamespace>
<AssemblyName>Swift.DAL</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>

179
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,15 +20,24 @@
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 () {
$('#ContentPlaceHolder1_reg_front_id').on('change', function (e) {
$('.loadImg').remove();
@ -99,8 +106,6 @@
$(document).ready(function () {
//$("#ContentPlaceHolder1_occupation").prop("disabled", true);
$("#<%=verificationTypeNo.ClientID%>").on("change", function () {
var idtype = $("#<%=idType.ClientID%>").val();
@ -145,7 +150,7 @@
$("#<%=zipCode.ClientID%>").keyup(function () {
var len = $(this).val().length;
if (len == '7') {
GetAddressByZipCode();
GetAddressByPostCode();
}
});
<%-- $("#<%=zipCode.ClientID%>").keydown(function () {
@ -164,7 +169,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 +219,7 @@
// $('#ContentPlaceHolder1_occupationHidden').val(11385);
// $('#ContentPlaceHolder1_occupation').val(11385);
//}
});
});--%>
$('#<%=occupation.ClientID%>').change(function () {
$('#ContentPlaceHolder1_occupationHidden').val($('#<%=occupation.ClientID%>').val());
@ -314,6 +319,62 @@
});
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();
if (senIdType == "") {
@ -477,13 +538,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 +573,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,7 +589,7 @@
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);
}
@ -650,7 +711,7 @@
alert(msg);
}
function GetAddressByZipCode() {
<%--function GetAddressByZipCode() {
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var zipCodeValue = $("#<%=zipCode.ClientID%>").val();
$("#txtState").val('');
@ -666,7 +727,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 +762,7 @@
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
}--%>
function ShowIdTypeInfo() {
var idInfo = $('#<%=idType.ClientID%>').val();
@ -713,7 +774,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,7 +810,7 @@
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
}--%>
function PopulateAreaDDL(data, selectedValue) {
var option, selValue = '';
@ -824,14 +885,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,16 +1083,23 @@
</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>
@ -1039,14 +1112,14 @@
</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 +1131,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 +1157,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 +1203,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 +1247,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>
@ -1266,7 +1359,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 +1369,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"

48
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();
@ -145,7 +150,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration
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", "");
@ -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(),

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

@ -491,15 +491,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 +545,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>

324
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 () {
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);
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 () {
$('#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
});
@ -491,15 +541,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);
@ -679,120 +729,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();
@ -876,6 +812,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 +888,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 +983,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,17 +1085,23 @@
</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="form-group">
@ -1108,11 +1111,11 @@
</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" />
@ -1127,8 +1130,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 +1192,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 +1236,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>
@ -1323,7 +1347,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 +1358,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 +1367,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">

70
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();
@ -170,9 +173,9 @@ namespace Swift.web.Remit.Administration.CustomerRegistration
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");
}
@ -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)
{

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

@ -329,15 +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>
@ -464,15 +455,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 +509,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 +591,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>

2
Swift.web/Swift.web.csproj

@ -13,7 +13,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swift.web</RootNamespace>
<AssemblyName>Swift.web</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<FileUpgradeFlags>
</FileUpgradeFlags>

Loading…
Cancel
Save