Browse Source

new changes

feature/19315_Customer-Registration
shakun 11 months ago
parent
commit
d683e5c9c2
  1. 14
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs
  2. 7
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs
  3. 46
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs
  4. 6
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs
  5. 6
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs
  6. 71
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs
  7. 47
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs
  8. 2
      CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionReportController.cs
  9. 163
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml
  10. 15
      CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml
  11. 67
      CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml
  12. 15
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml
  13. 41
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml
  14. 3
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml
  15. 5
      CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

14
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Repository.Repository.DocumentRepository;
using CustomerOnlineV2.Repository.Repository.ReceiverRepository;
using System;
@ -26,9 +27,16 @@ namespace CustomerOnlineV2.Business.Business.DocumentBusiness
public string WebRootPath => throw new NotImplementedException();
public async Task<CustomerDocumentModel> Document(CustomerDocumentModel doc, string Id, string user)
public async Task<CommonResponse> GetCustomerImageSavePath(string userId)
{
var model1 = await _docRepository.GetCustomerImageSavePath(userId);
return model1;
}
public async Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string Id, string user)
{
var model1 = await _docRepository.GetDocument(doc, Id, user);
var model1 = await _docRepository.AddCustomerDocument(doc, Id, user);
return model1;
}
}

7
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs

@ -1,11 +1,12 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.DocumentModel;
namespace CustomerOnlineV2.Business.Business.DocumentBusiness
{
public interface IDocumentBusiness
{
string WebRootPath { get; }
Task<CustomerDocumentModel> Document(CustomerDocumentModel doc, string userId, string userName);
Task<CommonResponse> GetCustomerImageSavePath(string userId);
Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string userId, string userName);
}
}

46
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs

@ -43,7 +43,51 @@ namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
// // }
//}
public async Task<CustomerDocumentModel> GetDocument(CustomerDocumentModel doc, string id, string user)
public async Task<CommonResponse> GetCustomerImageSavePath(string userId)
{
CommonResponse doc = new CommonResponse();
try
{
var sql = "EXEC proc_mobile_StaticData @flag= 'img-path'";
sql += ", @customerId = " + _connHelper.FilterString(userId);
var dirDetails = _connHelper.ExecuteDataRow(sql);
if (null == dirDetails)
{
doc.ResponseCode = ResponseHelper.FAILED;
doc.ResponseMessage = "DB Null Error!";
}
string registrationDate = dirDetails["REGISTERED_DATE"].ToString();
string membershipId = dirDetails["MEMBERSHIPID"].ToString();
if (string.IsNullOrEmpty(registrationDate) || string.IsNullOrEmpty(membershipId))
{
doc.ResponseCode = ResponseHelper.FAILED;
doc.ResponseMessage = "Invalid Customer Details";
}
else
{
doc.ResponseCode = ResponseHelper.SUCCESS;
doc.ResponseMessage = ResponseMessageHelper.SUCCESS;
doc.Id = membershipId;
doc.Extra1 = registrationDate;
}
}
catch (Exception ex)
{
doc.ResponseCode = ResponseHelper.EXCEPTION;
doc.ResponseMessage = "Exception occured: " + ex.Message;
}
return await Task.FromResult(doc);
}
public async Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string id, string user)
{
try
{

6
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs

@ -1,10 +1,12 @@
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Common.Models;
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);
Task<CommonResponse> GetCustomerImageSavePath(string userId);
Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string? id, string? user);
}
}

6
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs

@ -99,12 +99,14 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository
obj.Add(new CustomerTransaction
{
Id = Convert.ToString(item["Id"]),
Amount = Convert.ToString(item["Amount"]),
cAmt = Utilities.ShowDecimal(item["CAmount"].ToString()),
Amount = Utilities.ShowDecimal(Convert.ToString(item["Amount"])),
receiverName = Convert.ToString(item["receiverName"]),
PaymentMethod = Convert.ToString(item["PaymentMethod"]),
ControlNo = Convert.ToString(item["controlNo"]),
PBankName = Convert.ToString(item["PBankName"]),
PCurrency = Convert.ToString(item["PCurrency"]),
CollCurr = Convert.ToString(item["collCurr"]),
TransactionDay = Convert.ToString(item["TransactionDay"]),
TransactionMonth = Convert.ToString(item["TransactionMonth"]),
Status = Convert.ToString(item["Status"])
@ -340,6 +342,7 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository
{
if (ds.Tables.Count > 0)
{
var dt = ds.Tables[0];
_response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]);
_response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]);
@ -364,6 +367,7 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository
}
_response.NotificationModel = obj;
}
if (ds.Tables.Count > 1)
{
_response.RewardAmount = ds.Tables[1].Rows[0]["RewardAmount"].ToString();

71
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs

@ -3,11 +3,13 @@ using CustomerOnlineV2.Authorization;
using CustomerOnlineV2.Business.Business.RegisterBusiness;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models.ReceiverModel;
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Common.Models.TransactionModel;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models.HomeModel;
using CustomerOnlineV2.Common.Models.ReceiverModel;
@ -29,15 +31,12 @@ namespace CustomerOnlineV2.Controllers
_registerBusiness = registerBusiness;
}
//[BindProperty]
//public OnlineCustomerRegisterModel Input { get; set; }
///[Authorization("Customer")]
public IActionResult CustomerRegistration()
{
return View();
}
[HttpPost]
//[Authorization("AddCustomer")]
[ValidateAntiForgeryToken]
@ -58,7 +57,6 @@ namespace CustomerOnlineV2.Controllers
// return _response;
}
[HttpPost]
public async Task<JsonResult> GetAddressByPostCode([FromBody] string postalCode)
{
@ -80,39 +78,18 @@ namespace CustomerOnlineV2.Controllers
return Json(jsonResponse);
}
public async Task<IActionResult> Success()
{
return View();
}
[Authorization("CustomerProfile")]
public async Task <IActionResult> CustomerProfile(CustomerList customer)
{
//var staticDataResponse = _registerBusiness.GetTranCustomerById(customer);
//var viewModel = new CustomerList
//{
// Email = na,
// otp = "",
//};
//if (staticDataResponse.ErrorCode == "0" && staticDataResponse.Extra3.Equals("100"))
//{
// ViewBag.ResponseCode = "0";
// ViewBag.ResponseMessage = "OTP has been sent.";
// return View(viewModel);
//}
//else
//{
// if (staticDataResponse.Extra3.Equals("103"))
// {
// ViewBag.ResponseCode = "103";
// ViewBag.ResponseMessage = "OTP already has been sent.";
// return View(viewModel);
// }
// ViewBag.ResponseCode = staticDataResponse.ErrorCode;
// ViewBag.ResponseMessage = staticDataResponse.Msg;
// _logger.LogError("ACCOUNTCONTROLLER | REQUESTOTP | ERROR OCCURED | " + JsonConvert.SerializeObject(staticDataResponse));
// return View(viewModel);
//}
return View();
}
[HttpGet]
@ -123,10 +100,10 @@ namespace CustomerOnlineV2.Controllers
return await _registerBusiness.GetTranCustomerById(loginDetails);
}
[Authorization("Notifications")]
public IActionResult Notifications()
{
return View();
}
@ -139,7 +116,6 @@ namespace CustomerOnlineV2.Controllers
return await _registerBusiness.GetAllNotificationDetails(loginDetails);
}
[HttpPost]
[Authorization("UpdateCustomer")]
@ -150,24 +126,28 @@ namespace CustomerOnlineV2.Controllers
var customer1 = await _registerBusiness.UpdateCustomers(customer, loginDetails.UserId);
return customer1;
}
[Authorization("Refer")]
public IActionResult Refer()
{
return View();
}
[HttpGet]
[Route("GetRewardDetails")]
public async Task<CustomerNotificationModel> GetRewardDetails()
{
var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
return await _registerBusiness.GetRewardPoints(loginDetails);
}
[HttpPost]
[Authorization("UpdateDocument")]
public async Task<CustomerListModel> UpdateDocument(CustomerListModel customer, string id)
{
var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
var customer1 = await _registerBusiness.UpdateDocuments(customer, loginDetails.UserId);
return customer1;
}
@ -178,31 +158,14 @@ namespace CustomerOnlineV2.Controllers
var loginDetails = HttpContext.GetLoginDetails();
return await _registerBusiness.GetRewardAmount(loginDetails);
}
[HttpGet]
[Route("ValidateReferralCode/{referralCode}")]
public async Task<CommonResponse> ValidateReferralCode(string referralCode)
{
//var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
return await _registerBusiness.ValidateReferralCode(referralCode);
}
//[HttpPost]
////[ApplicationLevelAuthentication]
//[Route("mobile/validateReferralCode")]
//public IHttpActionResult ValidateReferralCode(validateReferralCodeRequest request)
//{
// LogicalThreadContext.Properties[LoggerProperty.CREATEDBY] = request.referralCode;
// LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "ValidateReferralCode";
// LogicalThreadContext.Properties[LoggerProperty.IPADDRESS] = Request.GetClientIpAddress();
// Log.Debug("ValidateReferralCode | REQUEST : " + JsonConvert.SerializeObject(request));
// if (ModelState.IsValid)
// {
// var response = _requestServices.ValidateReferralCode(request.referralCode);
// return Ok(response);
// }
// return ModelValidationError(ModelState);
//}
}
}

47
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs

@ -6,6 +6,8 @@ using CustomerOnlineV2.Business.Business.DocumentBusiness;
using Microsoft.AspNetCore.Hosting;
using System.Reflection;
using CustomerOnlineV2.Authorization;
using System.IO;
using Serilog;
namespace CustomerOnlineV2.Controllers
{
@ -23,13 +25,52 @@ namespace CustomerOnlineV2.Controllers
return View();
}
public static string GetTimestamp(DateTime value)
{
return value.ToString("yyyyMMddHHmmssffff");
}
private static string SaveFileToPath(IFormFile file, string membershipId, string extension, string img, string registrationDate)
{
string fileName = "";
string docUploadPath = ApplicationConfig.GetDocumentUploadPath();
// Get the file size
fileName = "upload-" + img + "-" + GetTimestamp(DateTime.Now) + extension;
docUploadPath = docUploadPath + "/CustomerDocument/" + registrationDate.Replace("_", "/") + "/" + membershipId;
Log.Debug("Preparing file to save in dir " + docUploadPath);
if (!Directory.Exists(docUploadPath))
Directory.CreateDirectory(docUploadPath);
if (file.Length > 0)
{
string filePath = Path.Combine(docUploadPath, file.FileName);
using (Stream fileStream = new FileStream(filePath, FileMode.Create))
{
file.CopyToAsync(fileStream);
}
}
Log.Debug("Done with Saving ");
return fileName;
}
[HttpPost]
[Authorization("AddDocment")]
public async Task<CustomerDocumentModel> AddDocment(CustomerDocumentModel doc, string id, string user)
[Authorization("AddDocument")]
public async Task<CustomerDocumentModel> AddDocument(CustomerDocumentModel doc, IFormFile MyUploader)
{
var loginDetails = HttpContext.GetLoginDetails();
var cd= await _business.GetCustomerImageSavePath(loginDetails.Email);
doc.fileName = MyUploader.FileName;
SaveFileToPath(MyUploader, cd.Id, Path.GetExtension(MyUploader.FileName), MyUploader.FileName, cd.Extra1);
//ReceiverInformationModel _response = new ReceiverInformationModel();
var Document = await _business.Document(doc, loginDetails.UserId, loginDetails.UserName);
var Document = await _business.AddCustomerDocument(doc, loginDetails.UserId, loginDetails.Email);
//if (ModelState.IsValid)

2
CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionReportController.cs

@ -20,6 +20,7 @@ namespace CustomerOnlineV2.Controllers
public IActionResult TranReport()
{
@ViewBag.ResponseCode = "0";
return View();
}
[HttpPost]
@ -27,6 +28,7 @@ namespace CustomerOnlineV2.Controllers
[Authorization("GetTransactionReportList")]
public async Task<CustomerTransactionList> GetTransactionReportList(CustomerTransaction model)
{
@ViewBag.ResponseCode = "1";
var loginDetails = HttpContext.GetLoginDetails();
return await _transactionBusiness.GetTransactionReportList(loginDetails, model);
}

163
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml

@ -1,5 +1,4 @@
@model CustomerOnlineV2.Common.Models.RegisterModel.OnlineCustomerRegisterModel
@using CustomerOnlineV2.Common.Helper
@{
Layout = "_Layout2";
@ -100,7 +99,6 @@
<div class="row gx-3 align-items-baseline">
<label class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">Occupation :</label>
<p class="col-sm-9 text-3" id="occupation">
</p>
</div>
<div class="row gx-3 align-items-baseline">
@ -117,7 +115,6 @@
</div>
</div>
<!-- Edit Details Modal -->
<!-- Personal Details End -->
<!-- Account Settings -->
<div class="bg-white shadow-sm rounded p-4 mb-4">
@ -171,7 +168,6 @@
<div class="row g-3">
<input asp-for="customerId" hidden />
<div class="col-12 col-sm-6">
<label for="postalCode" class="form-label">Zip Code</label>
@ -209,6 +205,7 @@
<div class="col-12 col-sm-6">
<label for="city" class="form-label">City</label>
<input type="text" id="pCity" class="form-control" required placeholder="City" readonly />
</div>
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Address1</label>
@ -279,7 +276,6 @@
<div class="col-12 col-sm-6">
<label for="zipCode" class="form-label">Id Type</label>
<select class="form-select" id="idType" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required>
</select>
</div>
<div class="col-12 col-sm-6">
@ -289,7 +285,6 @@
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Id Issue Country</label>
<select class="form-select" id="nativeCountry" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("allCountrylist", true)" required>
</select>
</div>
<div class="col-12 col-sm-6">
@ -323,8 +318,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-4">Front</span>
</div>
<div class="account-doc-overlay rounded">
@ -337,8 +331,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-4">Back</span>
</div>
<div class="account-doc-overlay rounded">
@ -356,12 +349,7 @@
</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>
@ -376,8 +364,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-4">Front</span>
</div>
<div class="account-doc-overlay rounded">
@ -424,7 +411,7 @@
<form id="updateCard" method="post">
<div class="mb-3">
<label for="IdFront" class="form-label">Document Type</label>
<select class="form-select" id="documentType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required>
<select class="form-select" id="primary-IdType" 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>
@ -435,8 +422,9 @@
<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" id="fileName" class="form-control" placeholder="Chose File..." />
<div class="flex-grow-1">
<input type="file" id="IdFrontUpload" class="form-control" placeholder="Chose File..." />
@* <img id="myUploadedImg" alt="Photo" style="width:180px;" /> *@
</div>
@* <span class="input-group-text px-2">
@ -449,8 +437,9 @@
<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 class="flex-grow-1">
<input type="file" id="IdBackUpload" 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>
@ -461,9 +450,9 @@
<div class="d-grid mt-4">
@* <button class="btn btn-primary" onclick="btnUpload" type="submit">Update Document </button> *@
<button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;">
@* <button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;">
<span class="ButtonTExt">Update Document</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div>
</button>
</button> *@
</div>
</form>
</div>
@ -476,47 +465,33 @@
<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>
<h5 class="modal-title fw-400">Update Proof of address</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" id="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> *@
<label for="IdFront" class="form-label">Address Document Type</label>
<select class="form-select" id="Add-IdType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getAdditional-IdType", true)" required>
</select>
</div>
<div class="mb-3">
<label for="IdFront" class="form-label">Document Front</label>
<label for="IdFront" class="form-label">Document</label>
<div class="input-group flex-nowrap">
<div class="flex-grow-1 input-file">
<input type="text" id="fileName" class="form-control" placeholder="Chose File..." />
<div class="flex-grow-1 ">
<input type="file" id="add_idUpload" class="form-control" placeholder="Chose File..." />
@* <img id="myUploadedImg" alt="Photo" style="width:180px;" /> *@
</div>
</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> *@
<button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;">
@* onclick="FileUpload('', '11396', 'Additional_ID_Front', 'add_idUpload')"; *@
<button type="button" class="btn btn-lg btn-primary" style="width: 250px;">
<span class="ButtonTExt">Update Document</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div>
</button>
</div>
@ -537,10 +512,8 @@
$(document).ready(function () {
getData();
});
$(document).on('click', '#btnSearch', function (e) {
e.preventDefault();
var postalCode = $('#postalCode').val();
@ -576,12 +549,12 @@
.addClass('btn btn-primary')
.text('Select')
.click(function (event) {
var Address1 = item.Address1;
var city = item.City;
$('#pCity').val(city);
$('#pAddress1').val(Address1);
$('#apiDataPopup').modal('hide');
event.preventDefault();
@ -601,12 +574,9 @@
}
});
});
function getData() {
debugger;
$.ajax({
//var id;
@ -706,48 +676,93 @@
}
function FileUpload() {
function img_pathUrl(id, e) {
// $('#' + id)[0].src = (window.URL ? URL : webkitURL).createObjectURL(input.files[0]);
$('.loadImg').remove();
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
}
$("#IdFrontUpload").on('change', function (e) {
debugger;
let documentType = $('#documentType').val();
let fileName = $('#fileName').val();
// if (documentType === '10997') {
let idtype = $('#primary-IdType').val();
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg"><img height=120 width=200 src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
FileUpload(idtype, '11394', 'ID_Front', 'IdFrontUpload');
});
// onpagehide.IdBack;
$("#IdBackUpload").on('change', function (e) {
// }
let Data = {
let idtype = $('#primary-IdType').val();
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg1"><img height=120 width=200 src="' + tmppath + '" alt=""></span>');
$(".loadImg1 img").fadeIn("fast");
}
FileUpload(idtype, '11395', 'ID_Back', 'IdBackUpload');
});
documentType: documentType,
fileName: fileName,
$("#add_idUpload").on('change', function (e) {
};
let idtype = $('#primary-IdType').val();
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg3"><img height=120 width=200 src="' + tmppath + '" alt=""></span>');
$(".loadImg1 img").fadeIn("fast");
}
FileUpload(idtype, '11396', 'Additional_ID_Front', 'add_idUpload');
});
function FileUpload(idtype, documentType,desc, id) {
const formData = new FormData();
let file = $('#' + id).prop("files")[0];
formData.append('MyUploader', file);
formData.append('fileType', idtype);
formData.append('documentType', documentType);
formData.append('description', desc);
$.ajax(
{
type: 'POST',
url: '/CustomerDocument/AddDocment',
data: Data,
processData: true,
headers: {
"RequestVerificationToken":
$('input[name="__RequestVerificationToken"]').val()
},
url: '/CustomerDocument/AddDocument',
data: formData,
cache: false,
contentType: false,
processData: false,
async: true,
beforeSend: function (xhr) {
xhr.setRequestHeader("RequestVerificationToken",
$('input:hidden[name="__RequestVerificationToken"]').val());
},
success: function (response) {
if (response.responseCode != 0) {
ShowAlertMessageErrorOnly(data, response.responseMessage);
return false;
}
ShowAlertMessage("0", "Document Add successfully.");
},
error: function (data) {
ShowAlertMessageErrorOnly(1, "Error ocurred during update!");
alert("Error occurs");
}
});
}
</script>
}

15
CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml

@ -32,8 +32,7 @@
<!-- 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=""> *@
<img class="rounded-circle" src="@Url.Content("~/images/profile-thumb.jpg")" alt="" />
<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">
@ -75,8 +74,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Front</span>
</div>
<div class="account-doc-overlay rounded">
@ -89,8 +87,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Back</span>
</div>
<div class="account-doc-overlay rounded">
@ -122,8 +119,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Front</span>
</div>
<div class="account-doc-overlay rounded">
@ -136,8 +132,7 @@
<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"> *@
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" />
<img src="images/profile-thumb.jpg" class="img-fluid">
<span class="mt-2">Back</span>
</div>
<div class="account-doc-overlay rounded">

67
CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml

@ -11,8 +11,6 @@
</style>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="@Url.Content("~/Content/styles.css")" rel="stylesheet" type="text/css" />
<script src="~/vendor/jquery/jquery.min.js"></script>
</head>
@ -27,10 +25,7 @@
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="/Transaction/SendMoney">
<span class="d-block text-10 text-light mt-1 mb-1">
@* <img src="images/menu1.jpg" height="80">
*@ <img src="@Url.Content("~/images/menu1.jpg")" height="80" />
</span>
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu1.jpg" height="80"></span>
<p class="text-2 text-strong">Send Money</p>
</a>
</div>
@ -38,22 +33,56 @@
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="/ReceiverInformation/Receiver">
<span class="d-block text-10 text-light mt-1 mb-1">
@* <img src="images/menu7.jpg" height="80">
*@ <img src="@Url.Content("~/images/menu7.jpg")" height="80" />
</span>
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu7.jpg" height="80"></span>
<p class="text-2 text-strong">Add Receiver</p>
</a>
</div>
</div>
@* <div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu2.jpg" height="80"></span>
<p class="text-2 text-strong">Open Bank Account</p>
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu3.jpg" height="80"></span>
<p class="text-2 text-strong">Open D-Mat Account</p>
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu4.jpg" height="80"></span>
<p class="text-2 text-strong">Moile Topup</p>
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu5.jpg" height="80"></span>
<p class="text-2 text-strong">Purchase Share</p>
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu6.jpg" height="80"></span>
<p class="text-2 text-strong">Voting</p>
</a>
</div>
</div>
*@
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="/TransactionReport/TranReport">
<span class="d-block text-10 text-light mt-1 mb-1">
@* <img src="images/menu8.jpg" height="80">
*@ <img src="@Url.Content("~/images/menu8.jpg")" height="80" />
</span>
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu8.jpg" height="80"></span>
<p class="text-2 text-strong">View Reports</p>
</a>
</div>
@ -74,7 +103,6 @@
<div class="col-3 col-sm-1">Payment Mode</div>
<div class="col-4 col-sm-2">Receiver Name</div>
<div class="col-5 col-sm-2"> Reference Number</div>
<div class="col-6 col-sm-2 d-none d-sm-block text-center">Status</div>
<div class="col-7 col-sm-1">Send Amount </div>
<div class="col-8 col-sm-2">Recieve Amount </div>
@ -423,9 +451,11 @@
} else if (d['status'].toLowerCase() == 'cancel') {
row += `<div class="col-6 col-sm-2 d-none d-sm-block text-center text-1"><span class="text-danger" data-bs-toggle="tooltip" title="" data-bs-original-title="Cancel"><i class="fas fa-times-circle"></i> Cancel</span></div>`;
} else if (d['status'].toLowerCase() == 'processing') {
row += `<div class="col-6 col-sm-2 d-none d-sm-block text-center text-1"><span class="text-warning" data-bs-toggle="tooltip" title="In Progress"><i class="fas fa-ellipsis-h"></i> Processing</span></div>`;
row += `<div class="col-6 col-sm-2 d-none d-sm-block text-center text-1"><span class="text-warning" data-bs-toggle="tooltip" title="In Progress">PROCESSING</span></div>`;
}
row += `<div class="col-7 col-sm-1 text-center"><span class="d-block text-1 fw-300">${d['amount']}</span><span class="d-block text-1 fw-300 text-uppercase">(${d['pCurrency']})</span></div>`;
else
row += `<div class="col-6 col-sm-2 d-none d-sm-block text-center text-1"><span class="text-warning" data-bs-toggle="tooltip" title="Status"> ${d['status']}</span></div>`;
row += `<div class="col-7 col-sm-1 text-center"><span class="d-block text-1 fw-300">${d['cAmt']}</span><span class="d-block text-1 fw-300 text-uppercase">(${d['collCurr']})</span></div>`;
// row += `<div class="col-7 col-sm-2"><span class="text-nowrap">-${d['amount']}</span><span class="text-2 text-uppercase">(${d['pCurrency']})</span></div>`;
//row += `<div class="col-8 col-sm-2"><span class="text-nowrap">${d['amount']}</span><span class="text-2 text-uppercase">(${d['pCurrency']})</span></div>`;
row += `<div class="col-8 col-sm-2 text-center"><span class="d-block text-1 fw-300">${d['amount']}</span><span class="d-block text-1 fw-300 text-uppercase">(${d['pCurrency']})</span></div>`;
@ -440,7 +470,6 @@
}
function getData(id) {
$.ajax({
type: 'GET',

15
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml

@ -11,15 +11,12 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.5/css/intlTelInput.css">
<link rel="stylesheet" href="./intlmask.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.5/js/intlTelInput.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.5/js/utils.js"></script>
<script src="./intlmask.js"></script>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
@ -320,6 +317,7 @@
</div>
</div>
</div>
<script>
(function () {
'use strict'
@ -387,11 +385,9 @@
.find('[name="Mobile"]')
.intlTelInput({
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.5/js/utils.js",
autoPlaceholder: true,
initialCountry: "us",
geoIpLookup: "auto",
});
@ -711,12 +707,7 @@
}
</script>
</body>
</html>
@* @section Scripts{
} *@

41
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml

@ -9,7 +9,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@ViewData["Title"] - CustomerOnlineV2</title>
<link href="@Url.Content("~/Content/styles.css")" rel="stylesheet" type="text/css" />
<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" />
@ -22,6 +21,7 @@
.login-signup ul.navbar-nav > li.dropdown.notifications .dropdown-menu li > a:not(.btn) > i:not(.arrow) {
left: -14px !important;
}
.reward-text {
font-size: 15px;
font-weight: bold;
@ -57,8 +57,7 @@
============================= -->
<div class="logo me-3">
<a class="d-flex" href="/Home" title="IME Londan">
@* <img src="/images/imelondon.svg" height="30" alt="IME London - Logo" /> *@
<img src="@Url.Content("~/images/imelondon.svg")" height="30" alt="IME London - Logo" />
<img src="/images/imelondon.svg" height="30" alt="IME London - Logo" />
</a>
</div>
<!-- Logo end -->
@ -117,8 +116,7 @@
</li>
<li class="dropdown profile ms-2">
<a class="px-0 dropdown-toggle" href="javascript:void(0)">
@* <img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" /> *@
<img class="rounded-circle" src="@Url.Content("~/images/profile-thumb.jpg")" width="32" alt="" />
<img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" />
</a>
<ul class="dropdown-menu">
<li class="text-center text-3 py-2">Hi, @firstName</li>
@ -157,11 +155,10 @@
<!-- 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=""> *@
<img class="rounded-circle" src="@Url.Content("~/images/profile-thumb.jpg")" alt="" />
<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" accept="image">
<input type="file" class="custom-file-input" id="customFile">
</div>
</div>
<p class="text-3 fw-500 mb-2">Hello, @firstName</p>
@ -241,31 +238,6 @@
$(document).ready(function () {
GetNotificationList();
// GetRewardDetails();
const fileInput = $("#customFile");
fileInput.on('change', function () {
if (fileInput[0].files.length > 0) {
const file = fileInput[0].files[0];
const formData = new FormData();
formData.append('file', file);
$.ajax({
url: '/CustomerDocumentController/UploadProfilePic',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (response) {
console.log(response);
},
error: function (error) {
// any errors, if needed
console.error(error);
}
});
}
});
});
function GetNotificationList() {
@ -312,7 +284,6 @@
}
});
}
// function PopulateNotificationData(response) {
// var result = response.notificationModel;
@ -352,8 +323,10 @@
debugger
var result = response.notificationModel;
if (response.responseCode == 0) {
var rewardPoints = response.rewardAmount;
$('#rewardValue').text(rewardPoints);
var notificationDetail = $('#notificationDetail');
var countElement = $('#count');
var notificationCount = response.notificationModel[0].notificationCount;

3
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml

@ -109,8 +109,7 @@
</li>
<li class="dropdown profile ms-2">
<a class="px-0 dropdown-toggle" href="#">
@* <img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" /> *@
<img class="rounded-circle" src="@Url.Content("~/images/profile-thumb.jpg")" width="32" alt="" />
<img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" />
</a>
<ul class="dropdown-menu">
<li class="text-center text-3 py-2">Hi, @firstName</li>

5
CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

@ -46,7 +46,7 @@
<button type="submit" onclick="GetTransactionList()">Search</button>
</form>
<i class="fa-regular fa-print iziToast-color-green"></i>
</div>
<br />
@ -61,6 +61,7 @@
<div class="col-5 col-sm-1">Collected Amount</div>
<div class="col-6 col-sm-1">Total Sent Amount</div>
<div class="col-7 col-sm-1">Delivery Method</div>
<div class="col-8 col-sm-1 text-end">Transaction Detail View</div>
@* <div class="col-7 col-sm-1 text-end">Total Sent Amount</div> *@
@ -168,7 +169,9 @@
<script>
$(document).ready(function () {
if ('@ViewBag.ResponseCode' == '0') {
GetTransactionList();
}
});
function GetTransactionList() {
debugger;

Loading…
Cancel
Save