diff --git a/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs b/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs index 2bb71ef..e7935d4 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs @@ -16,6 +16,6 @@ namespace CustomerOnlineV2.Business.Business.ReceiverBusiness Task GetAllReceiverList(LoginResponse loginDetails); Task EditReceiverById(string id); Task UpdateReceiverById(ReceiverInformationModel model, string id, string user); - Task GetDDLAgentList(AgentDropDownModel model, LoginResponse loginDetails); + Task GetDDLList(CommonDropDownModel model, LoginResponse loginDetails); } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/ReceiverBusiness.cs b/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/ReceiverBusiness.cs index e02f05d..affb90b 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/ReceiverBusiness.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/ReceiverBusiness.cs @@ -52,13 +52,20 @@ namespace CustomerOnlineV2.Business.Business.ReceiverBusiness return await _receiverRepository.UpdateReceiverById(model, id, user); } - public async Task GetDDLAgentList(AgentDropDownModel model, LoginResponse loginDetails) + public async Task GetDDLList(CommonDropDownModel model, LoginResponse loginDetails) { - return await _receiverRepository.GetAgentDDLList(model, loginDetails); + return await _receiverRepository.GetDDLList(model, loginDetails); } + + + //public async Task GetDDLList(CommonDropDownModel model, LoginResponse loginDetails) + //{ + // return await _homeRepo.GetDDLList(model, loginDetails); + //} + //public static List GetDDLAgentList(string flag, bool showSelectOption = false, string selectedValue = "", string userName = "" , string countryid,) //{ // HelperBusiness _receiverRepository = new HelperBusiness(); diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs index de3774e..1302b31 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs @@ -47,22 +47,22 @@ namespace CustomerOnlineV2.Common.Models.ReceiverModel public List? ReceiverInformationModel { get; set; } } - public class AgentDropDownModel - { - public string Flag { get; set; } - public string Value { get; set; } - public string Country { get; set; } - public string parm { get; set; } - } + //public class AgentDropDownModel + //{ + // public string Flag { get; set; } + // public string Value { get; set; } + // public string Country { get; set; } + // public string Value3 { get; set; } + ////} - public class AgentDropDownList - { - public List AgentDropDownResponse { get; set; } - } + //public class AgentDropDownList + //{ + // public List AgentDropDownResponse { get; set; } + //} - public class AgentDropDownResponse - { - public string Text { get; set; } - public string Id { get; set; } - } + //public class AgentDropDownResponse + //{ + // public string Text { get; set; } + // public string Id { get; set; } + //} } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs index de44786..70b5fdc 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs @@ -19,6 +19,6 @@ namespace CustomerOnlineV2.Repository.Repository.ReceiverRepository Task GetAllReceiverList(LoginResponse loginDetails); Task EditReceiverById(string id); Task UpdateReceiverById(ReceiverInformationModel model, string id, string user); - Task GetAgentDDLList(AgentDropDownModel model, LoginResponse loginDetails); + Task GetDDLList(CommonDropDownModel model, LoginResponse loginDetails); } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/ReceiverRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/ReceiverRepository.cs index 1d4928c..92f2f2b 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/ReceiverRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/ReceiverRepository.cs @@ -7,6 +7,7 @@ using CustomerOnlineV2.Repository.ConnectionHelper; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Data; +using System.Web.WebPages.Html; namespace CustomerOnlineV2.Repository.Repository.ReceiverRepository { @@ -263,16 +264,16 @@ namespace CustomerOnlineV2.Repository.Repository.ReceiverRepository } return await Task.FromResult(model); } - - public async Task GetAgentDDLList(AgentDropDownModel model, LoginResponse loginDetails) + + public async Task GetDDLList(CommonDropDownModel model, LoginResponse loginDetails) { try { var sql = "EXEC proc_sendPageLoadData"; - sql += " @Flag = " + _connHelper.FilterString(model.Flag); - sql += ", @selectedValue1 = " + _connHelper.FilterString(model.Value); - sql += " ,@CountryId = " + _connHelper.FilterString(model.Country); - sql += " ,@parm = " + _connHelper.FilterString(model.parm); + sql += " @Flag = " + _connHelper.FilterString("rec-select-agent"); + sql += ", @param = " + _connHelper.FilterString("Bank Deposit"); + sql += " ,@CountryId = " + _connHelper.FilterString("233"); + sql += " ,@pCountryId = " + _connHelper.FilterString("151"); @@ -281,26 +282,26 @@ namespace CustomerOnlineV2.Repository.Repository.ReceiverRepository if (dt == null || dt.Rows.Count <= 0) { - return new AgentDropDownList(); + return new CommonDropDownList(); } - List _resp = new List(); + List _resp = new List(); foreach (DataRow item in dt.Rows) { - _resp.Add(new AgentDropDownResponse + _resp.Add(new DropDownResponse { - Id = Utilities.GetRowCellValue(item["Id"]), - Text = Utilities.GetRowCellValue(item["Text"]) + Id = Utilities.GetRowCellValue(item["bankid"]), + Text = Utilities.GetRowCellValue(item["AGENTNAME"]) }); } - return new AgentDropDownList { AgentDropDownResponse = _resp }; + return new CommonDropDownList { DropDownResponse = _resp }; } catch (Exception ex) { _logger.LogError("RECEIVERREPOSITORY | GETDDAGENTLLIST | " + ex.Message); - return new AgentDropDownList { AgentDropDownResponse = new List() }; + return new CommonDropDownList { DropDownResponse = new List() }; } } } diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml index 57b9f90..9897680 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml @@ -193,9 +193,10 @@
- @* + asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("rec-select-agent", true)" @@ -353,24 +354,21 @@ }); - // $('#paymentMode').change(function () { + $('#paymentMode').change(function () { + debugger; - - // if ($(this).val() != '') { - // //PopulateDDL('paymentMode', 'pMode', $(this).val(), true, ''); - // //if ($(this).val()) - // //PopulateDDL('Relationship', 'getRelation', $(this).val(), true, ''); - // //PopulateDDL('idType', 'getIdType', $(this).val(), true, ''); - // PopulateDDL('bankName', 'select-agent', $(this).val(), true, ''); - // } - // else { - // //$('#paymentMode').empty(); - // // $('#Relationship').empty(); - // //$('#idType').empty(); - // $('#bankName').empty(); - // } - // }); + if ($(this).val() != '') { + + PopulateAgentDDL('bankName', 'rec-select-agent', $(this).val(), true, ''); + } + else { + //$('#paymentMode').empty(); + // $('#Relationship').empty(); + //$('#idType').empty(); + $('#bankName').empty(); + } + }); // $('#paymentMode').change(function () { @@ -394,10 +392,11 @@ }); - function PopulateAgentDDL(id, flag, value, parm, countryId, showSelectOption, selectedVal) { + function PopulateAgentDDL(id, flag, pCountryid, parm, countryId, showSelectOption, selectedVal) { + debugger; let Data = { Flag: flag, - Value: value, + pCountry: pCountryid, Parm: parm, CountryId: countryId }; @@ -405,7 +404,7 @@ $.ajax( { type: 'POST', - url: '/ReceiverInformation/GetDDLAgentList', + url: '/ReceiverInformation/GetDDLList', data: Data, headers: { "RequestVerificationToken":