Browse Source

bank dropdown list

feature/19315_Customer-Registration-new
Dinesh 11 months ago
parent
commit
a1f01872dc
  1. 2
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs
  2. 11
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/ReceiverBusiness.cs
  3. 32
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs
  4. 2
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs
  5. 27
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/ReceiverRepository.cs
  6. 39
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml

2
CustomerOnlineV2/CustomerOnlineV2.Business/Business/ReceiverBusiness/IReceiverBusiness.cs

@ -16,6 +16,6 @@ namespace CustomerOnlineV2.Business.Business.ReceiverBusiness
Task<CustomerReceiverModel> GetAllReceiverList(LoginResponse loginDetails);
Task<ReceiverEditModel> EditReceiverById(string id);
Task<ReceiverInformationModel> UpdateReceiverById(ReceiverInformationModel model, string id, string user);
Task<AgentDropDownList> GetDDLAgentList(AgentDropDownModel model, LoginResponse loginDetails);
Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails);
}
}

11
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<AgentDropDownList> GetDDLAgentList(AgentDropDownModel model, LoginResponse loginDetails)
public async Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails)
{
return await _receiverRepository.GetAgentDDLList(model, loginDetails);
return await _receiverRepository.GetDDLList(model, loginDetails);
}
//public async Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails)
//{
// return await _homeRepo.GetDDLList(model, loginDetails);
//}
//public static List<SelectListItem> GetDDLAgentList(string flag, bool showSelectOption = false, string selectedValue = "", string userName = "" , string countryid,)
//{
// HelperBusiness _receiverRepository = new HelperBusiness();

32
CustomerOnlineV2/CustomerOnlineV2.Common/Models/ReceiverModel/ReceiverInformationModel.cs

@ -47,22 +47,22 @@ namespace CustomerOnlineV2.Common.Models.ReceiverModel
public List<ReceiverInformationModel>? 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> AgentDropDownResponse { get; set; }
}
//public class AgentDropDownList
//{
// public List<AgentDropDownResponse> 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; }
//}
}

2
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/ReceiverRepository/IReceiverRepository.cs

@ -19,6 +19,6 @@ namespace CustomerOnlineV2.Repository.Repository.ReceiverRepository
Task<CustomerReceiverModel> GetAllReceiverList(LoginResponse loginDetails);
Task<ReceiverEditModel> EditReceiverById(string id);
Task<ReceiverInformationModel> UpdateReceiverById(ReceiverInformationModel model, string id, string user);
Task<AgentDropDownList> GetAgentDDLList(AgentDropDownModel model, LoginResponse loginDetails);
Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails);
}
}

27
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<AgentDropDownList> GetAgentDDLList(AgentDropDownModel model, LoginResponse loginDetails)
public async Task<CommonDropDownList> 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<AgentDropDownResponse> _resp = new List<AgentDropDownResponse>();
List<DropDownResponse> _resp = new List<DropDownResponse>();
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<AgentDropDownResponse>() };
return new CommonDropDownList { DropDownResponse = new List<DropDownResponse>() };
}
}
}

39
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml

@ -193,9 +193,10 @@
<div class="col-md-3">
<div class="mb-3">
<label class="form-label">Agent/Bank</label>
<select class="form-select form-control" asp-for="bankName" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("select-agent", true)">
<select class="form-select form-control" asp-for="bankName" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("rec-select-agent", true)" >
@* <option selected="selected" value="">Select Bank</option>
asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("rec-select-agent", true)"
<option value="1163">AGRICULTURAL DEVELOPMENT BANK LTD</option>
<option value="1120">APEX DEVELOPMENT BANK LTD</option>
<option value="1121">ARANIKO DEVELOPMENT BANK LTD</option>
@ -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":

Loading…
Cancel
Save