Browse Source

Change password

feature/19315_Customer-Registration-new
Dinesh 12 months ago
parent
commit
b8fa6d4c32
  1. 32
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs
  2. 9
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs
  3. 23
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/DocumentModel/CustomerDocumentModel.cs
  4. 106
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs
  5. 10
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs
  6. 67
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs
  7. 5
      CustomerOnlineV2/CustomerOnlineV2/Program.cs
  8. 4
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml
  9. 93
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml
  10. 250
      CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml
  11. 2
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml

32
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs

@ -0,0 +1,32 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Repository.Repository.DocumentRepository;
using CustomerOnlineV2.Repository.Repository.ReceiverRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace CustomerOnlineV2.Business.Business.DocumentBusiness
{
public class DocumentBusiness : IDocumentBusiness
{
private readonly IDocumentRepository _docRepository;
public DocumentBusiness(IDocumentRepository docRepository)
{
_docRepository = docRepository;
}
public async Task<CustomerDocumentModel> Document(CustomerDocumentModel doc, string? Id, string? user)
{
var model1 = await _docRepository.GetDocument(doc, Id, user);
return model1;
}
}
}

9
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs

@ -0,0 +1,9 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
namespace CustomerOnlineV2.Business.Business.DocumentBusiness
{
public interface IDocumentBusiness
{
Task<CustomerDocumentModel> Document(CustomerDocumentModel doc, string userId, string userName);
}
}

23
CustomerOnlineV2/CustomerOnlineV2.Common/Models/DocumentModel/CustomerDocumentModel.cs

@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomerOnlineV2.Common.Models.DocumentModel
{
public class CustomerDocumentModel: CommonResponse
{
public string? cdid { get; set; }
public string? customerId { get; set; }
public string? fileName { get; set;}
public string? description { get; set; }
public string? fileType { get; set; }
public string? documentType { get; set; }
public string? user { get; set;}
public string? sessionId { get; set; }
public IFormFile File { get; set; }
}
}

106
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs

@ -0,0 +1,106 @@
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Repository.ConnectionHelper;
using CustomerOnlineV2.Repository.Repository.RegisterRepository;
using Microsoft.VisualBasic.FileIO;
using NPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
{
public class DocumentRepository : IDocumentRepository
{
private readonly IConnectionHelper _connHelper;
public DocumentRepository(IConnectionHelper connHelper)
{
_connHelper = connHelper;
}
//public void ExecuteStoredProcedure(string fileName)
//{
// // try
// // {
// // string sql = "exec proc_customerDocumentType";
// // if (cdId != "")
// // {
// // sql += " @flag ='u'";
// // }
// // else
// // {
// // sql += " @flag ='i'";
// // }
// // sql += ",@customerId =" + FilterString(customerId);
// // sql += ",@cdId =" + FilterString(cdId);
// // sql += ",@fileName =" + FilterString(fileName);
// // sql += ",@fileDescription =" + FilterString(fileDescription);
// // sql += ",@fileType =" + FilterString(fileType);
// // sql += ",@documentType =" + FilterString(documentType);
// // sql += ",@user =" + FilterString(user);
// // sql += ",@rowIdField =" + FilterString(sessionId);
// // }
// //catch (Exception ex)
// // {
// // ex.Message(w)
// // }
//}
public async Task<CustomerDocumentModel> GetDocument(CustomerDocumentModel doc, string id, string user)
{
try
{
var sql = "exec proc_customerDocumentType";
sql += " @flag = " + _connHelper.FilterString("i");
sql += ",@customerId =" + _connHelper.FilterString(id);
sql += ",@user = " + _connHelper.FilterString(user);
sql += ",@cdId =" + _connHelper.FilterString(doc.cdid);
sql += ",@fileName =" + _connHelper.FilterString(doc.fileName);
sql += ",@fileDescription =" + _connHelper.FilterString(doc.description);
sql += ",@fileType =" + _connHelper.FilterString(doc.fileType);
sql += ",@documentType =" + _connHelper.FilterString(doc.documentType);
sql += ",@rowIdField =" + _connHelper.FilterString(doc.sessionId);
var dt = _connHelper.ExecuteDataTable(sql);
if (dt == null || dt.Rows.Count <= 0)
{
doc.ResponseCode = ResponseHelper.FAILED;
doc.ResponseMessage = "DB Null Error!";
// _logger.LogError("RECEIVERREPOSITORY | GETRECEIVEDRDETAILS | DB RESPONSE | " + JsonConvert.SerializeObject(_response));
}
else
{
doc.ResponseCode = ResponseHelper.SUCCESS;
doc.ResponseMessage = ResponseMessageHelper.SUCCESS;
// _response.firstName = Convert.ToString(dt.Rows[0]["firstName"]);
// _response.middleName = Convert.ToString(dt.Rows[0]["middleName"]);
// _response.lastName1 = Convert.ToString(dt.Rows[0]["lastName1"]);
// _response.Country = Convert.ToString(dt.Rows[0]["Country"]);
// _response.Address = Convert.ToString(dt.Rows[0]["Address"]);
// _response.State = Convert.ToString(dt.Rows[0]["State"]);
}
}
catch (Exception ex)
{
doc.ResponseCode = ResponseHelper.EXCEPTION;
doc.ResponseMessage = "Exception occured: " + ex.Message;
//_logger.LogError("RECEIVERREPOSITORY | GETRECEIVEDRDETAILS | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(doc);
}
}
}

10
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs

@ -0,0 +1,10 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
{
public interface IDocumentRepository
{
//void ExecuteStoredProcedure(string fileName);
Task<CustomerDocumentModel> GetDocument(CustomerDocumentModel doc, string? id, string? user);
}
}

67
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs

@ -0,0 +1,67 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Common.Models.ReceiverModel;
using CustomerOnlineV2.Repository.Repository.DocumentRepository;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Protocols;
using NuGet.Protocol.Core.Types;
using NuGet.Protocol.Plugins;
using CustomerOnlineV2.Common.Helper;
using HttpPostAttribute = Microsoft.AspNetCore.Mvc.HttpPostAttribute;
using CustomerOnlineV2.Business.Business.DocumentBusiness;
namespace CustomerOnlineV2.Controllers
{
public class CustomerDocumentController : Controller
{
private readonly IDocumentBusiness _business;
public CustomerDocumentController(IDocumentBusiness business)
{
_business = business;
}
public IActionResult CustomerDocument()
{
return View();
}
[HttpPost]
public async Task<CustomerDocumentModel> AddDocment(CustomerDocumentModel doc, string id, string user)
{
var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
var Document = await _business.Document(doc, loginDetails.UserId, loginDetails.UserName);
return Document;
}
//public async Task <IActionResult> Upload(CustomerDocumentModel model)
//{
// var loginDetails = HttpContext.GetLoginDetails();
// //ReceiverInformationModel _response = new ReceiverInformationModel();
// var receiver1 = await _receiverBusiness.Receivers(receiver, loginDetails.UserId, loginDetails.UserName);
// return receiver1;
// //////ar result = dbresult.Extra.Split('|');
// //var customerId = result[0];
// //var membershipId = result[1];
// //var registerDate = result[2];
// //var loginDetails = HttpContext.GetLoginDetails();
// //if (model.File != null && model.File.Length > 0)
// //{
// // var fileName = model.File.FileName;
// // var documentType = model.File.ContentType;
// // ///var
// // _repository.ExecuteStoredProcedure(fileName);
// // return Json(new { success = true, message = "File uploaded and processed successfully." });
// //}
// //return Json(new { success = false, message = "File upload failed." });
//}
}
}

5
CustomerOnlineV2/CustomerOnlineV2/Program.cs

@ -1,11 +1,13 @@
using CustomerOnlineV2.Api.API.TPApi;
using CustomerOnlineV2.Business.Business.AccountBusiness;
using CustomerOnlineV2.Business.Business.DocumentBusiness;
using CustomerOnlineV2.Business.Business.HomeBusiness;
using CustomerOnlineV2.Business.Business.ReceiverBusiness;
using CustomerOnlineV2.Business.Business.RegisterBusiness;
using CustomerOnlineV2.Business.Business.TransactionBusiness;
using CustomerOnlineV2.Repository.ConnectionHelper;
using CustomerOnlineV2.Repository.Repository.AccountRepository;
using CustomerOnlineV2.Repository.Repository.DocumentRepository;
using CustomerOnlineV2.Repository.Repository.HomeRepository;
using CustomerOnlineV2.Repository.Repository.ReceiverRepository;
using CustomerOnlineV2.Repository.Repository.RegisterRepository;
@ -53,7 +55,8 @@ builder.Services.AddScoped<IReceiverRepository, ReceiverRepository>();
builder.Services.AddScoped<IRegisterBusiness, RegisterBusiness>();
builder.Services.AddScoped<IRegisterRepository, RegisterRepository>();
builder.Services.AddScoped<IDocumentRepository, DocumentRepository>();
builder.Services.AddScoped<IDocumentBusiness, DocumentBusiness>();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();

4
CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml

@ -86,11 +86,11 @@
<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="NewPassword" placeholder="IMe12312@3asdfk43933" required>
<label for="floatingInput">Current Password</label>
<label for="floatingInput">New Password</label>
</div>
<div class="form-floating mb-3">
<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 class="col-lg-3 mt-4">
<div class="d-grid mb-5">

93
CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml

@ -1,12 +1,66 @@
@model CustomerOnlineV2.Common.Models.AccountModel.PasswordResetModel
@{
Layout = "_Layout2";
Layout = null;
}
<!DOCTYPE html>
<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>
<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">
<!-- Who we are -->
@ -20,8 +74,8 @@
<div class="text-3"> Reset passowrd is simple, your can reset your password right away</div>
<p class="sec-subtitle"></p>
</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">
<label for="floatingInput">Email address</label>
</div>
@ -30,14 +84,14 @@
<div class="d-grid mb-5">
@* <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>
<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>
</div>
</div>
</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>
@ -72,6 +126,25 @@
</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>
<script type="text/javascript">
(function () {
@ -90,9 +163,9 @@
else {
event.preventDefault();
$('.resetText').hide();
$('#BtnReset').css('cursor', 'not-allowed');
$('#BtnLogin').css('cursor', 'not-allowed');
$('.loading').show();
$('#BtnReset').prop('disabled', true);
$('#BtnLogin').prop('disabled', true);
$("#reset-form").submit();
}

250
CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml

@ -0,0 +1,250 @@
@model CustomerOnlineV2.Common.Models.DocumentModel.CustomerDocumentModel
@using CustomerOnlineV2.Common.Helper
@{
Layout = "_Layout2";
}
@{
var userInfo = Context.GetLoginDetails();
var fullName = userInfo.FullName;
var username = userInfo.UserName;
var firstName = fullName.Split(' ')[0];
var mobileNumber = userInfo.MobileNumber;
var email = userInfo.Email;
var userId = userInfo.UserId;
var errorMessage = Context.Request.Cookies["ErrorMessage"];
var errorCode = Context.Request.Cookies["ErrorCode"];
CustomerOnlineV2.Helper.HelperClass.RemoveCookies("ErrorMessage", Context);
CustomerOnlineV2.Helper.HelperClass.RemoveCookies("ErrorCode", Context);
}
<!-- Content -->
<div id="content" class="bg-light py-4">
<div class="container">
<div class="row">
<!-- Left Panel -->
<aside class="col-lg-3">
<!-- Profile Details -->
<div class="bg-white rounded text-center p-3 mb-4">
<div class="profile-thumb mt-3 mb-4">
<img class="rounded-circle" src="images/profile-thumb.jpg" alt="">
<div class="profile-thumb-edit bg-primary text-white" data-bs-toggle="tooltip" title="Change Profile Picture">
<i class="fas fa-camera position-absolute"></i>
<input type="file" class="custom-file-input" id="customFile">
</div>
</div>
<p class="text-3 fw-500 mb-2">Hello, @firstName</p>
<p class="text-3 fw-500 mb-2">User Id : <span>@userId</span></p>
<p class="mb-2">
<a href="profile.html" class="text-5 text-light" data-bs-toggle="tooltip" title="Edit Profile">
<i class="fas fa-edit"></i>
</a>
</p>
<div class="d-grid">
<a href="document-upload.html" class="btn btn-primary">Upload documents</a>
</div>
</div>
<!-- Profile Details End -->
<!-- Need Help? -->
<div class="bg-white rounded text-center p-3 mb-4">
<div class="text-17 text-light my-3"><i class="fa fa-bullhorn"></i></div>
<h3 class="text-5 fw-400 my-4">Refer a Friend</h3>
<p class="text-muted opacity-8 mb-4">Refer a Friend and Earn Rewards!</p>
<div class="d-grid">
<a href="refer.html" class="btn btn-primary">Refer a Friend</a>
</div>
</div>
<!-- Need Help? End -->
</aside>
<!-- Left Panel End -->
<!-- Middle Panel -->
<div class="col-lg-9">
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 mb-4">Valid ID Card<span class="text-muted text-2 ms-2">(BRP Card / Passport / Driving License)</span></h3>
<hr class="mb-4 mx-n4" />
<div class="row g-3">
<div class="col-12 col-md-6 col-lg-4">
<div class="account-doc rounded p-3">
<div class="front">
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Front</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="account-doc rounded p-3">
<div class="front">
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Back</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<a href="" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="account-doc-new d-flex align-items-center rounded h-100 p-3 mb-4 mb-lg-0">
<p class="w-100 text-center lh-base m-0">
<span class="text-3"><i class="fas fa-plus-circle"></i></span> <span class="d-block text-body text-3">Add New Document</span>
</p>
</a>
</div>
</div>
</div>
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 mb-4">Proof of address<span class="text-muted text-2 ms-2">(Bank Statement / Utility Bills / Driving License)</span></h3>
<hr class="mb-4 mx-n4" />
<div class="row g-3">
<div class="col-12 col-md-6 col-lg-4">
<div class="account-doc rounded p-3">
<div class="front">
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Front</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="account-doc rounded p-3">
<div class="front">
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Back</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<a href="" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="account-doc-new d-flex align-items-center rounded h-100 p-3 mb-4 mb-lg-0">
<p class="w-100 text-center lh-base m-0">
<span class="text-3"><i class="fas fa-plus-circle"></i></span> <span class="d-block text-body text-3">Add New Document</span>
</p>
</a>
</div>
</div>
</div>
<!-- Edit Card Details Modal -->
<div id="edit-doc-details" class="modal fade" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fw-400">Update Document</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body p-4">
<form id="updateCard" method="post">
<div class="mb-3">
<label for="IdFront" class="form-label">Document Type</label>
<select class="form-select" asp-for="documentType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required>
@* <select class="form-select" id="doc" name=""> *@
@* <option value="0" selected>-- Select --</option>
<option value="1">Id Card</option>
<option value="2">Passport </option>
<option value="3">License</option> *@
</select>
</div>
<div class="mb-3">
<label for="IdFront" class="form-label">Document Front</label>
<div class="input-group flex-nowrap">
<div class="flex-grow-1 input-file">
<input type="text" asp-for="fileName" class="form-control" placeholder="Chose File..." />
</div>
<span class="input-group-text px-2">
<button class="btn-choose bg-transparent text-white border-0" type="button">Upload</button>
</span>
</div>
</div>
<div class="mb-3">
<label for="IdBack" class="form-label">Document Back</label>
<div class="input-group flex-nowrap">
<div class="flex-grow-1 input-file">
<input type="text" id="IdBack" class="form-control" placeholder="Chose File...">
</div>
<span class="input-group-text px-2">
<button class="btn-choose bg-transparent text-white border-0" type="button">Upload</button>
</span>
</div>
</div>
<div class="d-grid mt-4"><button class="btn btn-primary" onclick="btnUpload" type="submit">Update Document</button></div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Middle Panel End -->
</div>
</div>
</div>
<!-- Content end -->
@section Scripts {
<script>
$(document).ready(function () {
debugger;
$('#updateCard').submit(function (e) {
e.preventDefault();
var formData = new FormData(this);
$.ajax({
url: '/CustomerDocument/Upload',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (data) {
// Handle success
$('#result').text('File uploaded successfully.');
},
error: function (error) {
// Handle error
$('#result').text('File upload failed: ' + error.responseText);
}
});
});
});
$(document).ready(function () {
debugger;
$('#submit').click(function () {
var url = $(location).attr('href');
$('#btnUpload').html('<strong>' + url + '</strong>');
});
});
</script>
}

2
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml

@ -154,7 +154,7 @@
<i class="fas fa-edit"></i>
</a>
<div class="">
<a href="document-upload.html" class="px-1 text-3">Upload Documents</a>|<a href="profile.html" class="px-1 text-3">Edit Profile</a>
<a href="/CustomerDocument/CustomerDocument" class="px-1 text-3">Upload Documents</a>|<a href="profile.html" class="px-1 text-3">Edit Profile</a>
</div>
</p>

Loading…
Cancel
Save