Browse Source

merge from master

feature/19315_Customer-Registration
shakun 12 months ago
parent
commit
4468362e78
  1. 72
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs
  2. 3
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs
  3. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs
  4. 2
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs
  5. 56
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs
  6. 41
      CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs
  7. 8
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml
  8. 6
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml
  9. 91
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml

72
CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs

@ -6,6 +6,7 @@ using System.Net;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using CustomerOnlineV2.Common.Models.HomeModel;
namespace CustomerOnlineV2.Common.Models.RegisterModel namespace CustomerOnlineV2.Common.Models.RegisterModel
{ {
@ -32,23 +33,82 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel
public string? Extra2 { get; set; } public string? Extra2 { get; set; }
public object? Data { get; set; } public object? Data { get; set; }
} }
public class CustomerList : CommonResponse
{
public List<CustomerListModel>? CustomerListModel { get; set; }
}
public class CustomerListModel
{
public string? flag { get; set; }
public string? customerId { get; set; }
//public string? password { get; set; }
public string? firstName { get; set; }
public string? middleName { get; set; }
public string? lastName1 { get; set; }
public string? lastName2 { get; set; }
public string? country { get; set; }
public string? address { get; set; }
public string? state { get; set; }
public string? zipCode { get; set; }
public string? district { get; set; }
public string? city { get; set; }
public string? email { get; set; }
public string? homePhone { get; set; }
public string? workPhone { get; set; }
public string? mobile { get; set; }
public string? nativeCountry { get; set; }
public string? dob { get; set; }
public string? placeOfIssue { get; set; }
public string? customerType { get; set; }
public string? occupation { get; set; }
public string? isBlackListed { get; set; }
public string? createdBy { get; set; }
public string? createdDate { get; set; }
public string? modifiedBy { get; set; }
public string? modifiedDate { get; set; }
public string? approvedBy { get; set; }
public string? approvedDate { get; set; }
public string? isDeleted { get; set; }
public string? lastTranId { get; set; }
public string? sourceOfFound { get; set; }
public string? relationId { get; set; }
public string? relativeName { get; set; }
public string? address2 { get; set; }
public string? fullName { get; set; }
public string? postalCode { get; set; }
public string? idExpiryDate { get; set; }
public string? idType { get; set; }
public string? idNumber { get; set; }
public string? otherIdNumber { get; set; }
public string? telNo { get; set; }
public string? companyName { get; set; }
public string? gender { get; set; }
public string? salaryRange { get; set; }
public string? bonusPointPending { get; set; }
public string? totalSent { get; set; }
public string? idIssueDate { get; set; }
public string? customerStatus { get; set; }
public string? isActive { get; set; }
public string? islocked { get; set; }
public string? sessionId { get; set; }
public string? AboutUs { get; set; }
}
public class OnlineCustomerRegisterModel : CommonResponse public class OnlineCustomerRegisterModel : CommonResponse
{ {
[Required(ErrorMessage = "Password required")] [Required(ErrorMessage = "Password required")]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at most {1} characters long.", MinimumLength = 6)] [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at most {1} characters long.", MinimumLength = 6)]
public string Password { get; set; } public string Password { get; set; }
[Required] [Required]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; } public string ConfirmPassword { get; set; }
// public string customerPassword { get; set; }
public string? flag { get; set; } public string? flag { get; set; }
public string? customerId { get; set; } public string? customerId { get; set; }
//public string? password { get; set; } //public string? password { get; set; }
public string? membershipId { get; set; } public string? membershipId { get; set; }
public string? firstName { get; set; } public string? firstName { get; set; }
public string? middleName { get; set; } public string? middleName { get; set; }
@ -81,6 +141,7 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel
public string? sourceOfFound { get; set; } public string? sourceOfFound { get; set; }
public string? relationId { get; set; } public string? relationId { get; set; }
public string? relativeName { get; set; } public string? relativeName { get; set; }
public string? address2 { get; set; } public string? address2 { get; set; }
public string? fullName { get; set; } public string? fullName { get; set; }
public string? postalCode { get; set; } public string? postalCode { get; set; }
@ -112,6 +173,7 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel
public string? isActive { get; set; } public string? isActive { get; set; }
public string? islocked { get; set; } public string? islocked { get; set; }
public string? sessionId { get; set; } public string? sessionId { get; set; }
public string? AboutUs { get; set; } public string? AboutUs { get; set; }
} }
} }

3
CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs

@ -192,8 +192,11 @@ namespace CustomerOnlineV2.Common.Models.TransactionModel
{ {
public string? ControlNo { get; set; } public string? ControlNo { get; set; }
public string? CollectAmount { get; set; } public string? CollectAmount { get; set; }
public string? TransferAmount { get; set; }
public string? CollectCurrency { get; set; } public string? CollectCurrency { get; set; }
public string? ReceiverName { get; set; } public string? ReceiverName { get; set; }
public string? SenderName { get; set; }
public string? PCountry { get; set; }
public string? TransactionId { get; set; } public string? TransactionId { get; set; }
} }

1
CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs

@ -51,5 +51,6 @@ namespace CustomerOnlineV2.Common.Models.TransactionModel
public string? responsesitesecurity { get; set; } public string? responsesitesecurity { get; set; }
public string? title { get; set; } public string? title { get; set; }
public string? token { get; set; }
} }
} }

2
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs

@ -13,7 +13,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
public interface IRegisterRepository public interface IRegisterRepository
{ {
Task<CommonResponse> AddRegisterDetails(OnlineCustomerRegisterModel register); Task<CommonResponse> AddRegisterDetails(OnlineCustomerRegisterModel register);
// Task<CommonResponse> AddRegisterDetails(LoginResponse loginDetails);
Task<CustomerList> GetTranCustomerById(LoginResponse loginDetails);
Task<CustomerNotificationModel> GetAllNotificationDetails(LoginResponse loginDetails); Task<CustomerNotificationModel> GetAllNotificationDetails(LoginResponse loginDetails);
} }
} }

56
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs

@ -94,6 +94,62 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
return await Task.FromResult(model); return await Task.FromResult(model);
} }
public async Task<CustomerList> GetTranCustomerById(LoginResponse loginDetails)
{
CustomerList _response = new CustomerList();
try
{
var sql = "EXEC mobile_proc_online_customerMaster_V1";
sql += " @Flag = " + _connHelper.FilterString("detail");
sql += ",@customerId= " + _connHelper.FilterString(loginDetails.UserId);
//logger.LogDebug("HOMEREPOSITORY | GETTRANSACTIONDETAIL | SQL | " + sql);
var dt = _connHelper.ExecuteDataTable(sql);
if (dt == null || dt.Rows.Count <= 0)
{
_response.ResponseCode = ResponseHelper.FAILED;
_response.ResponseMessage = "DB Null Error!";
//_logger.LogError("HOMEREPOSITORY | GETTRANSACTIONDETAIL | DB RESPONSE | " + JsonConvert.SerializeObject(_response));
}
else
{
_response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]);
_response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]);
List<CustomerListModel> obj = new List<CustomerListModel>();
foreach (DataRow item in dt.Rows)
{
obj.Add(new CustomerListModel
{
fullName = Convert.ToString(item["fullName"]),
email = Convert.ToString(item["email"]),
mobile = Convert.ToString(item["mobile"]),
dob = Convert.ToString(item["dob"]),
zipCode = Convert.ToString(item["zipCode"]),
city = Convert.ToString(item["city"]),
country = Convert.ToString(item["countryName"]),
address = Convert.ToString(item["address1"]),
address2 = Convert.ToString(item["address2"]),
idType = Convert.ToString(item["idType"]),
idNumber = Convert.ToString(item["idNumber"]),
idIssueDate = Convert.ToString(item["idIssueDate"]),
idExpiryDate = Convert.ToString(item["idExpiryDate"]),
nativeCountry = Convert.ToString(item["ICountryName"])
});
}
_response.CustomerListModel = obj;
}
}
catch (Exception ex)
{
_response.ResponseCode = ResponseHelper.EXCEPTION;
_response.ResponseMessage = "Exception occured: " + ex.Message;
//logger.LogError("HOMEREPOSITORY | GETTRANSACTIONDETAIL | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
}
public async Task<CustomerNotificationModel> GetAllNotificationDetails(LoginResponse loginDetails) public async Task<CustomerNotificationModel> GetAllNotificationDetails(LoginResponse loginDetails)
{ {
CustomerNotificationModel _response = new CustomerNotificationModel(); CustomerNotificationModel _response = new CustomerNotificationModel();

41
CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs

@ -7,7 +7,6 @@ using Serilog.Context;
using CustomerOnlineV2.Authorization; using CustomerOnlineV2.Authorization;
using System.Text; using System.Text;
using System.Security.Cryptography; using System.Security.Cryptography;
using NuGet.Protocol.Plugins;
using CustomerOnlineV2.Common.Models.HomeModel; using CustomerOnlineV2.Common.Models.HomeModel;
using CustomerOnlineV2.Common.Models.AccountModel; using CustomerOnlineV2.Common.Models.AccountModel;
@ -149,13 +148,14 @@ namespace CustomerOnlineV2.Controllers
} }
_request.sitesecurity = $"h{builder.ToString()}"; _request.sitesecurity = $"h{builder.ToString()}";
TempData["TrustPaymentRequest"] = _request;
//TempData["TrustPaymentRequest"] = _request;
//var _response = _transactionBusiness.saveTranData(_request, loginDetails); //var _response = _transactionBusiness.saveTranData(_request, loginDetails);
_logger.LogInformation($"Payment | RESPONSE | {JsonConvert.SerializeObject(_request)}"); _logger.LogInformation($"Payment | RESPONSE | {JsonConvert.SerializeObject(_request)}");
var _response = await _transactionBusiness.SaveTranData(_request, loginDetails);
} }
return View(_request); return View(_request);
@ -186,38 +186,23 @@ namespace CustomerOnlineV2.Controllers
var siteReference = Request.Query["sitereference"]; var siteReference = Request.Query["sitereference"];
var transactionReference = Request.Query["transactionreference"]; var transactionReference = Request.Query["transactionreference"];
var _requestFromTempData = TempData["TrustPaymentRequest"] as TrustPaymentRequest;
//var _requestFromTempData = TempData["TrustPaymentRequest"] as TrustPaymentRequest;
var _request = new TrustPaymentRequest var _request = new TrustPaymentRequest
{ {
sitereference = _requestFromTempData?.sitereference,
stprofile = _requestFromTempData?.stprofile,
mainamount = _requestFromTempData?.mainamount,
billingfirstname = _requestFromTempData?.billingfirstname,
billinglastname = _requestFromTempData?.billinglastname,
billingstreet = _requestFromTempData?.billingstreet,
billingpostcode = _requestFromTempData?.billingpostcode,
billingtown = _requestFromTempData?.billingtown,
billingtelephone = _requestFromTempData?.billingtelephone,
customerpremise = _requestFromTempData?.customerpremise,
customerstreet = _requestFromTempData?.customerstreet,
customerpostcode = _requestFromTempData?.customerpostcode,
errorcode = errorCode,
orderreference = orderReference,
paymenttypedescription = paymentTypeDescription,
requestreference = requestReference,
responsesitesecurity = responseSiteSecurity,
settlestatus = settleStatus,
transactionreference = transactionReference
errorcode = errorCode.ToString(),
orderreference = orderReference.ToString(),
paymenttypedescription = paymentTypeDescription.ToString(),
requestreference = requestReference.ToString(),
responsesitesecurity = responseSiteSecurity.ToString(),
settlestatus = settleStatus.ToString(),
transactionreference = transactionReference.ToString()
}; };
var loginDetails = HttpContext.GetLoginDetails();
var _response = await _transactionBusiness.saveTranData(_request, loginDetails);
return View();
var loginDetails = HttpContext.GetLoginDetails();
var _response = await _transactionBusiness.SaveTranData(_request, loginDetails);
return View(_request);
} }

8
CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml

@ -84,13 +84,17 @@
<p class="sec-subtitle"></p> <p class="sec-subtitle"></p>
</div> </div>
<form asp-controller="Account" id="force-change-pwd" asp-action="ForceChangePassword" method="post" novalidate> <form asp-controller="Account" id="force-change-pwd" asp-action="ForceChangePassword" method="post" novalidate>
<div class="form-floating mb-3">
<input type="password" class="form-control" asp-for="OldPassword" placeholder="IMe12312@3asdfk43933" required>
<label for="floatingInput">Old Password</label>
</div>
<div class="form-floating mb-3"> <div class="form-floating mb-3">
<input type="password" class="form-control" asp-for="NewPassword" placeholder="IMe12312@3asdfk43933" required> <input type="password" class="form-control" asp-for="NewPassword" placeholder="IMe12312@3asdfk43933" required>
<label for="floatingInput">Current Password</label>
<label for="floatingInput">New Password</label>
</div> </div>
<div class="form-floating mb-3"> <div class="form-floating mb-3">
<input type="password" class="form-control" asp-for="ConfirmNewPassword" placeholder="IMe12312@3asdfk43933" required> <input type="password" class="form-control" asp-for="ConfirmNewPassword" placeholder="IMe12312@3asdfk43933" required>
<label for="floatingInput">Enter New Password</label>
<label for="floatingInput">Confirm Password</label>
</div> </div>
<div class="col-lg-3 mt-4"> <div class="col-lg-3 mt-4">
<div class="d-grid mb-5"> <div class="d-grid mb-5">

6
CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml

@ -29,7 +29,7 @@
<!-- Logo <!-- Logo
============================= --> ============================= -->
<div class="logo me-3"> <div class="logo me-3">
<a class="d-flex" href="index.html" title="Money - HTML Template">
<a class="d-flex" href="/" title="Money - HTML Template">
<img src="images/imelondon.svg" height="35" alt="IME London - Logo" /> <img src="images/imelondon.svg" height="35" alt="IME London - Logo" />
</a> </a>
</div> </div>
@ -44,8 +44,8 @@
<div id="header-nav" class="collapse navbar-collapse"> <div id="header-nav" class="collapse navbar-collapse">
<ul class="navbar-nav me-auto"> <ul class="navbar-nav me-auto">
<li><a href="faq.html">Help</a></li>
<li><a href="how-it-works.html">How It Works</a></li>
<li><a href="https://imelondon.co.uk/faqs" target="_blank">Help</a></li>
<li><a href="https://imelondon.co.uk/how-it-works" target="_blank">How It Works</a></li>
<li><a href="/Customer/CustomerRegistration">Register Now</a></li> <li><a href="/Customer/CustomerRegistration">Register Now</a></li>
</ul> </ul>
</div> </div>

91
CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml

@ -1,13 +1,67 @@
@model CustomerOnlineV2.Common.Models.AccountModel.PasswordResetModel @model CustomerOnlineV2.Common.Models.AccountModel.PasswordResetModel
@{ @{
Layout = "_Layout2";
Layout = null;
} }
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link href="~/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="~/vendor/font-awesome/css/all.min.css" rel="stylesheet" />
<link href="~/vendor/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet" />
<link href="~/vendor/currency-flags/css/currency-flags.min.css" rel="stylesheet" />
<link href="~/vendor/owl.carousel/owl.carousel.min.css" rel="stylesheet" />
<link href="~/css/styles-login.css" rel="stylesheet" />
<link href="~/vendor/toast-alert/izitoast.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="favicon.png" />
</head>
<body> <body>
<div id="main-wrapper"> <div id="main-wrapper">
<!-- Header -->
<header id="header">
<div class="container">
<div class="header-row">
<div class="header-column justify-content-between">
<!-- Logo
============================= -->
<div class="logo me-3">
<a class="d-flex" href="index.html" title="Money - HTML Template">
<img src="images/imelondon.svg" height="35" alt="IME London - Logo" />
</a>
</div>
<!-- Logo end -->
<!-- Collapse Button
============================== -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#header-nav"><span></span> <span></span> <span></span></button>
<!-- Collapse Button end -->
<!-- Primary Navigation
============================== -->
<nav class="primary-menu navbar navbar-expand-lg">
<div id="header-nav" class="collapse navbar-collapse">
<ul class="navbar-nav me-auto">
<li><a href="faq.html">Help</a></li>
<li><a href="how-it-works.html">How It Works</a></li>
<li><a href="/Customer/CustomerRegistration">Register Now</a></li>
</ul>
</div>
</nav>
<!-- Primary Navigation end -->
</div>
<div class="header-column justify-content-end">
<!-- Login & Signup Link
============================== -->
<!-- Login & Signup Link end -->
</div>
</div>
</div>
</header>
<!-- Header End -->
<!-- Page Header
<div id="content"> <div id="content">
<!-- Who we are --> <!-- Who we are -->
<section class="section section-form-bg"> <section class="section section-form-bg">
@ -20,8 +74,8 @@
<div class="text-3"> Reset passowrd is simple, your can reset your password right away</div> <div class="text-3"> Reset passowrd is simple, your can reset your password right away</div>
<p class="sec-subtitle"></p> <p class="sec-subtitle"></p>
</div> </div>
<form action="dashboard-new.html" id="reset-form" class="">
@* <form asp-controller="Account" id="reset-form" asp-action="ResetPassword" method="post" novalidate>*@ <div class="form-floating mb-3">
@* <form action="dashboard-new.html" id="reset-form" class=""> *@
<form asp-controller="Account" id="reset-form" asp-action="ResetPassword" method="post" novalidate> <div class="form-floating mb-3">
<input type="email" class="form-control" asp-for="Username" placeholder="name@example.com"> <input type="email" class="form-control" asp-for="Username" placeholder="name@example.com">
<label for="floatingInput">Email address</label> <label for="floatingInput">Email address</label>
</div> </div>
@ -30,14 +84,14 @@
<div class="d-grid mb-5"> <div class="d-grid mb-5">
@* <button class="btn btn-primary btn-sumbit-blue" type="submit">Request for link</button> *@ @* <button class="btn btn-primary btn-sumbit-blue" type="submit">Request for link</button> *@
<button type="submit" id="BtnReset" class="btn btn-lg btn-primary" style="width: 250px;">
<span class="resetText">Request For Link</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div>
<button type="submit" id="BtnLogin" class="btn btn-primary btn-sumbit-blue" style="width: 250px;">
<span class="resetText">Reset Now</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div> <i class="fa fa-window-maximize px-2 loginText" aria-hidden="true"></i>
</button> </button>
</div> </div>
</div> </div>
</form> </form>
<div class="mt-3"> Dont have username ? Registration won't take more than 5 min, <a class="" href="register-new.html">Register Now</a></div>
<div class="mt-3"> Dont have username ? Registration won't take more than 5 min, <a class="" href="/Customer/CustomerRegistration">Register Now</a></div>
<div class="mt-3"> Already registered, <a class="" href="/Account/Index">Login Now</a></div> <div class="mt-3"> Already registered, <a class="" href="/Account/Index">Login Now</a></div>
</div> </div>
@ -72,6 +126,25 @@
</div> </div>
<footer id="footer" class="footer-web">
<div class="container">
<div class="text-center">
<div class="row">
<div class="mx-auto">
<div class="text-center text-white">
<p class="text-center mb-3 text-1">
IME London is a product of Subhida UK Limited, Pentax House,South Hill Avenue, South Harrow, London, H2A 0D
Company Registration No. 06432399 Subhida UK Ltd is authorized and regulated by the Financial Conduct
Authority (FCA) <br> under the Payment Service Regulations 2017. FCA Registration No. 576127 HMRC Registration No. XYML000000119350
</p>
</div>
</div>
</div>
<div class="row"><div class="col-lg-6 mx-auto"><div class="text-center text-white"><p>© IME London, 2023</p></div></div></div>
</div>
</div>
</footer>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
(function () { (function () {
@ -90,9 +163,9 @@
else { else {
event.preventDefault(); event.preventDefault();
$('.resetText').hide(); $('.resetText').hide();
$('#BtnReset').css('cursor', 'not-allowed');
$('#BtnLogin').css('cursor', 'not-allowed');
$('.loading').show(); $('.loading').show();
$('#BtnReset').prop('disabled', true);
$('#BtnLogin').prop('disabled', true);
$("#reset-form").submit(); $("#reset-form").submit();
} }

Loading…
Cancel
Save