From ce5e9275dfc646ad5ec882653b00da24dda20496 Mon Sep 17 00:00:00 2001 From: shakun Date: Thu, 2 Nov 2023 22:08:36 +0545 Subject: [PATCH] changes --- .../RegisterRepository/RegisterRepository.cs | 1 + .../TransactionRepository.cs | 2 +- .../Controllers/CustomerController.cs | 44 ++++++++++------ .../Views/Customer/CustomerProfile.cshtml | 36 +++++++++++-- .../Customer/CustomerRegistration.cshtml | 52 +++++++++++++------ .../Views/ReceiverInformation/Receiver.cshtml | 26 ++++++++++ .../ViewReceiverList.cshtml | 28 +++++----- .../Views/Transaction/SendMoney.cshtml | 8 +-- .../Views/TransactionReport/TranReport.cshtml | 8 ++- 9 files changed, 146 insertions(+), 59 deletions(-) diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs index 1995e36..ae57fbe 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs @@ -128,6 +128,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository email = Convert.ToString(item["email"]), mobile = Convert.ToString(item["mobile"]), dob = Convert.ToString(item["dob"]), + occupation = Convert.ToString(item["occupation"]), zipCode = Convert.ToString(item["zipCode"]), city = Convert.ToString(item["city"]), country = Convert.ToString(item["countryName"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs index b16fe1b..cfd3a16 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs @@ -355,7 +355,7 @@ namespace CustomerOnlineV2.Repository.Repository.TransactionRepository //User = Convert.ToString(item["userId"]), TranId = Convert.ToString(item["tranId"]), ControlNo = Convert.ToString(item["controlNo"]), - CollAmt = Convert.ToString(item["collAmount"]), + CollAmt = Utilities.ShowDecimal(Convert.ToString(item["collAmount"])), PayoutAmt = Utilities.ShowDecimal(Convert.ToString(item["payoutAmt"])), PCurr = Convert.ToString(item["pCurr"]), CollCurr = Convert.ToString(item["collCurr"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs index e476335..13a69a8 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs +++ b/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs @@ -3,6 +3,7 @@ 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; @@ -12,6 +13,7 @@ using Newtonsoft.Json; using CustomerOnlineV2.Common.Helper; using CustomerOnlineV2.Common.Models.HomeModel; using CustomerOnlineV2.Common.Models.ReceiverModel; +using CustomerOnlineV2.Common.Models.AccountModel; namespace CustomerOnlineV2.Controllers { @@ -21,29 +23,37 @@ namespace CustomerOnlineV2.Controllers private readonly ILogger _logger; private readonly ITPApiService _tpApiService; - public CustomerController(ILogger logger, ITPApiService tpApiService, IRegisterBusiness registerBusiness) + public CustomerController(ILogger logger, ITPApiService tpApiService , IRegisterBusiness registerBusiness) { _logger = logger; _tpApiService = tpApiService; _registerBusiness = registerBusiness; } - //[BindProperty] - //public OnlineCustomerRegisterModel Input { get; set; } ///[Authorization("Customer")] public IActionResult CustomerRegistration() { return View(); } - [HttpPost] //[Authorization("AddCustomer")] [ValidateAntiForgeryToken] public async Task AddCustomer(OnlineCustomerRegisterModel register) { + + + // AddressListResponse _response = new AddressListResponse(); + // addressRequest.IpAddress = Utilities.GetIpAddressv2(HttpContext); + // addressRequest.ProcessId = Convert.ToString(Guid.NewGuid()); + // using (LogContext.PushProperty("DebugId", addressRequest.ProcessId)) + // { + // _logger.LogInformation($"GETADDRESSLIST | ADDRESSLIST | REQUEST | {JsonConvert.SerializeObject(addressRequest)}"); var register1 = await _registerBusiness.AddCustomers(register); return register1; + + // } + // return _response; } [HttpPost] @@ -68,16 +78,17 @@ namespace CustomerOnlineV2.Controllers return Json(jsonResponse); } + + public async Task Success() { + return View(); } - - public IActionResult CustomerProfile() + public async Task CustomerProfile(CustomerList customer) { return View(); } - [HttpGet] [Route("Customer/GetCustomerDetail")] public async Task GetCustomerDetail() @@ -85,8 +96,9 @@ namespace CustomerOnlineV2.Controllers var loginDetails = HttpContext.GetLoginDetails(); return await _registerBusiness.GetTranCustomerById(loginDetails); } - - [Authorization("Notifications")] + + + [Authorization("Notifications")] public IActionResult Notifications() { return View(); @@ -101,19 +113,18 @@ namespace CustomerOnlineV2.Controllers return await _registerBusiness.GetAllNotificationDetails(loginDetails); } - - [HttpPost] + [HttpPost] [Authorization("UpdateCustomer")] public async Task UpdateCustomer(CustomerListModel customer, string id) { var loginDetails = HttpContext.GetLoginDetails(); - + //ReceiverInformationModel _response = new ReceiverInformationModel(); var customer1 = await _registerBusiness.UpdateCustomers(customer, loginDetails.UserId); return customer1; } - - [Authorization("Refer")] + + [Authorization("Refer")] public IActionResult Refer() { return View(); @@ -124,18 +135,19 @@ namespace CustomerOnlineV2.Controllers public async Task GetRewardDetails() { var loginDetails = HttpContext.GetLoginDetails(); + return await _registerBusiness.GetRewardPoints(loginDetails); } - + [HttpPost] [Authorization("UpdateDocument")] public async Task UpdateDocument(CustomerListModel customer, string id) { var loginDetails = HttpContext.GetLoginDetails(); + //ReceiverInformationModel _response = new ReceiverInformationModel(); var customer1 = await _registerBusiness.UpdateDocuments(customer, loginDetails.UserId); return customer1; } - [HttpGet] [Route("GetRewardAmount")] public async Task GetRewardAmount() diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml index 8dec9e8..5b08826 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml @@ -96,6 +96,11 @@

+
+ +

+

+

@@ -518,18 +523,35 @@ + @* *@