Browse Source

#19315 updated

feature/19315_Customer-Registration
Leeza Baidar 12 months ago
parent
commit
5205b83af0
  1. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/CustomerOnlineV2.Common.csproj
  2. 2
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs
  3. 11
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml
  4. 1
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml

1
CustomerOnlineV2/CustomerOnlineV2.Common/CustomerOnlineV2.Common.csproj

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
</ItemGroup> </ItemGroup>

2
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs

@ -45,7 +45,7 @@ namespace CustomerOnlineV2.Controllers
//} //}
[HttpPost] [HttpPost]
public JsonResult GetAddressByPostCode(string postalCode)
public JsonResult GetAddressByPostCode([FromBody] string postalCode)
{ {
var postCode = postalCode.ToUpper(); var postCode = postalCode.ToUpper();
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + postCode; string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + postCode;

11
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml

@ -4,6 +4,9 @@
} }
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<script src="~/vendor/jquery/jquery.min.js"></script>
</head>
<body> <body>
<!-- Content --> <!-- Content -->
<div id="content"> <div id="content">
@ -411,7 +414,9 @@
<!-- Content end --> <!-- Content end -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
debugger;
$('#btnSearch').click(function () { $('#btnSearch').click(function () {
var postalCode = $('#PostalZipCode').val(); var postalCode = $('#PostalZipCode').val();
if (!postalCode) { if (!postalCode) {
@ -421,9 +426,11 @@
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/Customer/GetAddressByPostCode'
contentType: 'application/json; charset=utf-8',
url: '/Customer/GetAddressByPostCode',
//data: JSON.stringify({ postalCode: postalCode }),
data: JSON.stringify(postalCode),
dataType: 'json', dataType: 'json',
data: JSON.stringify({ postalCode: postalCode }),
success: function (response) { success: function (response) {
var data = response; var data = response;

1
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml

@ -17,6 +17,7 @@
<link href="~/css/styles-login.css" rel="stylesheet" /> <link href="~/css/styles-login.css" rel="stylesheet" />
<link href="~/vendor/toast-alert/izitoast.min.css" rel="stylesheet" /> <link href="~/vendor/toast-alert/izitoast.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="favicon.png" /> <link rel="icon" type="image/png" href="favicon.png" />
</head> </head>
<body> <body>
@{ @{

Loading…
Cancel
Save