diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/DesignTimeBuild/.dtbcache.v2 b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/DesignTimeBuild/.dtbcache.v2 index 3ce1492..6459618 100644 Binary files a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/DesignTimeBuild/.dtbcache.v2 and b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/DesignTimeBuild/.dtbcache.v2 differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/8cc015c1-aea9-4d15-84d0-91327ad1934f.vsidx b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/8cc015c1-aea9-4d15-84d0-91327ad1934f.vsidx deleted file mode 100644 index 63310dc..0000000 Binary files a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/8cc015c1-aea9-4d15-84d0-91327ad1934f.vsidx and /dev/null differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd47eca8-e44a-40ca-b0c7-8b11e911b0e9.vsidx b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd47eca8-e44a-40ca-b0c7-8b11e911b0e9.vsidx deleted file mode 100644 index 6f1de46..0000000 Binary files a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd47eca8-e44a-40ca-b0c7-8b11e911b0e9.vsidx and /dev/null differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd6572ed-0f7d-4953-bb34-95fd8cf2d9f4.vsidx b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd6572ed-0f7d-4953-bb34-95fd8cf2d9f4.vsidx new file mode 100644 index 0000000..ea6ec7b Binary files /dev/null and b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/dd6572ed-0f7d-4953-bb34-95fd8cf2d9f4.vsidx differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/e201466f-7afd-4ac3-ab72-025f5b13ea31.vsidx b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/e201466f-7afd-4ac3-ab72-025f5b13ea31.vsidx new file mode 100644 index 0000000..e3a0df8 Binary files /dev/null and b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/FileContentIndex/e201466f-7afd-4ac3-ab72-025f5b13ea31.vsidx differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.futdcache.v2 b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.futdcache.v2 index 5e4013a..319cac7 100644 Binary files a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.futdcache.v2 and b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.futdcache.v2 differ diff --git a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.suo b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.suo index a6b68ad..eb97fe3 100644 Binary files a/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.suo and b/CustomerOnlineRemit/.vs/CustomerOnlineRemit/v17/.suo differ diff --git a/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.metadata.v7.bin b/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.metadata.v7.bin index ae2116f..93704c3 100644 Binary files a/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.metadata.v7.bin and b/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.metadata.v7.bin differ diff --git a/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.projects.v7.bin b/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.projects.v7.bin index 313a1b3..ca98102 100644 Binary files a/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.projects.v7.bin and b/CustomerOnlineRemit/.vs/ProjectEvaluation/customeronlineremit.projects.v7.bin differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/AccountBusiness.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/AccountBusiness.cs index d352c2b..356068a 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/AccountBusiness.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/AccountBusiness.cs @@ -1,6 +1,7 @@ using CustomerOnlineRemit.Common.Model.Account; using CustomerOnlineRemit.Common.Model; using CustomerOnlineRemit.Repository.Repository.Account; +using CustomerOnlineRemit.Common.Model.Customer; namespace CustomerOnlineRemit.Business.Business.Account { @@ -16,5 +17,20 @@ namespace CustomerOnlineRemit.Business.Business.Account { return _accountRepo.DoLoginAsync(loginModel); } + + public Task GetDynamicTable(string flag) + { + return _accountRepo.GetDynamicTable(flag); + } + + public Task GetCustomerReceiverList(bool ShowAll) + { + return _accountRepo.GetCustomerReceiverList(ShowAll); + } + + public Task GetCustomerTransactionList(bool ShowAll) + { + return _accountRepo.GetCustomerTransactionList(ShowAll); + } } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/IAccountBusiness.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/IAccountBusiness.cs index 25033f5..440811f 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/IAccountBusiness.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Business/Business/Account/IAccountBusiness.cs @@ -1,10 +1,14 @@ using CustomerOnlineRemit.Common.Model.Account; using CustomerOnlineRemit.Common.Model; +using CustomerOnlineRemit.Common.Model.Customer; namespace CustomerOnlineRemit.Business.Business.Account { public interface IAccountBusiness { Task DoLoginAsync(LoginModel loginModel); + Task GetDynamicTable(string flag); + Task GetCustomerReceiverList(bool ShowAll); + Task GetCustomerTransactionList(bool ShowAll); } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.dll index 8c0282e..420b8b2 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.pdb index f74efda..8862ec2 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Business.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll index 4826301..dbe8eb5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb index 5d33f2b..3873125 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll index 325a080..85266e9 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb index bcf9beb..0104e1e 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.csproj.AssemblyReference.cache b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.csproj.AssemblyReference.cache index 8e9e765..70449d0 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.csproj.AssemblyReference.cache and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.csproj.AssemblyReference.cache differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.dll index 8c0282e..420b8b2 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.pdb index f74efda..8862ec2 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/CustomerOnlineRemit.Business.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/ref/CustomerOnlineRemit.Business.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/ref/CustomerOnlineRemit.Business.dll index a967bb2..6c2277c 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/ref/CustomerOnlineRemit.Business.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/ref/CustomerOnlineRemit.Business.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/refint/CustomerOnlineRemit.Business.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/refint/CustomerOnlineRemit.Business.dll index a967bb2..6c2277c 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/refint/CustomerOnlineRemit.Business.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Business/obj/Debug/net7.0/refint/CustomerOnlineRemit.Business.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/Helper/Utilities.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Helper/Utilities.cs index d36c811..2fe282b 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Common/Helper/Utilities.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Helper/Utilities.cs @@ -1,5 +1,7 @@ using CustomerOnlineRemit.Common.Configuration; +using CustomerOnlineRemit.Common.Model.Customer; using Newtonsoft.Json; +using System.Data; using System.Text.Json.Serialization; namespace CustomerOnlineRemit.Common.Helper @@ -21,6 +23,41 @@ namespace CustomerOnlineRemit.Common.Helper } } + public static dynamic ParseTableData(string flag, DataTable dt) + { + dynamic list = null; + if (flag.ToLower().Equals("customertxn")) + { + List obj = new List(); + foreach (DataRow item in dt.Rows) + { + obj.Add(new CustomerTransaction + { + Id = Convert.ToString(item["Id"]), + Amount = Convert.ToString(item["Amount"]), + Status = Convert.ToString(item["Status"]) + }); + } + list = obj; + } + else if (flag.ToLower().Equals("customerreceiver")) + { + List obj = new List(); + foreach (DataRow item in dt.Rows) + { + obj.Add(new CustomerModel + { + Id = Convert.ToString(item["Id"]), + Name = Convert.ToString(item["Name"]), + Country = Convert.ToString(item["Country"]), + TransactionType = Convert.ToString(item["TransactionType"]) + }); + } + list = obj; + } + return list; + } + public static string ReadFromAppSettings(string key, string defValue = "") { return ConfigurationManager.AppSettings[key] ?? defValue; diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/CommonResponse.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/CommonResponse.cs index 7fc7f77..824e835 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/CommonResponse.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/CommonResponse.cs @@ -29,11 +29,12 @@ } public string Id { get; set; } - public object Data { get; set; } + public dynamic Data { get; set; } + public List ListData { get; set; } public string Extra { get; set; } public string Extra2 { get; set; } - public CommonResponse SetResponse(int ResponseCode, string ResponseMessage, object Data = null) + public CommonResponse SetResponse(int ResponseCode, string ResponseMessage, dynamic Data = null) { return new CommonResponse(ResponseCode, ResponseMessage, Data); } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/Customer/CustomerModel.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/Customer/CustomerModel.cs new file mode 100644 index 0000000..f757076 --- /dev/null +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Common/Model/Customer/CustomerModel.cs @@ -0,0 +1,41 @@ +namespace CustomerOnlineRemit.Common.Model.Customer +{ + public class CustomerModel + { + public string? Id { get; set; } + public string? Name { get; set; } + public string? Country { get; set; } + public string? TransactionType { get; set; } + } + + public class ReceiverModel + { + public string? Id { get; set; } + public string? Name { get; set; } + public string? Country { get; set; } + public string? Mobile { get; set; } + public string? TransactionType { get; set; } + } + + public class CustomerReceiverModel : CommonResponse + { + public List ReceiverModel { get; set; } + } + + public class CustomerTransactionList : CommonResponse + { + public List CustomerTransaction { get; set; } + } + + public class CustomerTransaction + { + public string? Id { get; set; } + public string? TransactionMonth { get; set; } + public string? TransactionDay { get; set; } + public string? PaymentMethod { get; set; } + public string? PBankName { get; set; } + public string? Amount { get; set; } + public string? Status { get; set; } + public string? PCurrency { get; set; } + } +} diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll index 4826301..dbe8eb5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb index 5d33f2b..3873125 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.csproj.CoreCompileInputs.cache b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.csproj.CoreCompileInputs.cache index 1095a21..2531abf 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.csproj.CoreCompileInputs.cache +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -920738b58fa01e910179d0d32059cfc1af0f04e5 +4c32cd9b794c31d1353d906504e2aa2fefe95958 diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.dll index 4826301..dbe8eb5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.pdb index 5d33f2b..3873125 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/CustomerOnlineRemit.Common.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/ref/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/ref/CustomerOnlineRemit.Common.dll index 9388995..d2c4483 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/ref/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/ref/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/refint/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/refint/CustomerOnlineRemit.Common.dll index 9388995..d2c4483 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/refint/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Common/obj/Debug/net7.0/refint/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/AccountRepository.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/AccountRepository.cs index cd117d3..360ac4a 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/AccountRepository.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/AccountRepository.cs @@ -2,6 +2,9 @@ using CustomerOnlineRemit.Common.Model; using CustomerOnlineRemit.Repository.ConnectionServices; using Newtonsoft.Json; +using CustomerOnlineRemit.Common.Helper; +using CustomerOnlineRemit.Common.Model.Customer; +using System.Data; namespace CustomerOnlineRemit.Repository.Repository.Account { @@ -66,5 +69,145 @@ namespace CustomerOnlineRemit.Repository.Repository.Account } return Task.FromResult(_response); } + + public Task GetCustomerReceiverList(bool ShowAll) + { + CustomerReceiverModel _response = new CustomerReceiverModel(); + try + { + var sql = "EXEC PROC_DYNAMIC_TABLE"; + sql += " @Flag = " + _dbHelper.FilterString("CustomerReceiver"); + sql += " @ShowAll = " + _dbHelper.FilterString(ShowAll.ToString()); + + Log.Debug("ACCOUNTREPOSITORY | GETCUSTOMERRECEIVERLIST | SQL | " + sql); + var dt = _dbHelper.ExecuteDataTable(sql); + + if (dt == null || dt.Rows.Count <= 0) + { + _response.ResponseCode = ResponseHelper.FAILED; + _response.ResponseMessage = "DB Null Error!"; + + Log.Error("ACCOUNTREPOSITORY | GETCUSTOMERRECEIVERLIST | DB RESPONSE | " + JsonConvert.SerializeObject(_response)); + } + else + { + _response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]); + _response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]); + + List obj = new List(); + foreach (DataRow item in dt.Rows) + { + obj.Add(new ReceiverModel + { + Id = Convert.ToString(item["Id"]), + Name = Convert.ToString(item["Name"]), + Mobile = Convert.ToString(item["Mobile"]), + Country = Convert.ToString(item["Country"]), + TransactionType = Convert.ToString(item["TransactionType"]) + }); + } + _response.ReceiverModel = obj; + } + } + catch (Exception ex) + { + _response.ResponseCode = ResponseHelper.EXCEPTION; + _response.ResponseMessage = "Exception occured: " + ex.Message; + + Log.Error("ACCOUNTREPOSITORY | GETCUSTOMERRECEIVERLIST | EXCEPTION | " + JsonConvert.SerializeObject(_response)); + } + return Task.FromResult(_response); + } + + public Task GetCustomerTransactionList(bool ShowAll) + { + CustomerTransactionList _response = new CustomerTransactionList(); + try + { + var sql = "EXEC PROC_DYNAMIC_TABLE"; + sql += " @Flag = " + _dbHelper.FilterString("CustomerTxn"); + sql += " @ShowAll = " + _dbHelper.FilterString(ShowAll.ToString()); + + Log.Debug("ACCOUNTREPOSITORY | GETCUSTOMERTRANSACTIONLIST | SQL | " + sql); + var dt = _dbHelper.ExecuteDataTable(sql); + + if (dt == null || dt.Rows.Count <= 0) + { + _response.ResponseCode = ResponseHelper.FAILED; + _response.ResponseMessage = "DB Null Error!"; + + Log.Error("ACCOUNTREPOSITORY | GETCUSTOMERTRANSACTIONLIST | DB RESPONSE | " + JsonConvert.SerializeObject(_response)); + } + else + { + _response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]); + _response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]); + + List obj = new List(); + foreach (DataRow item in dt.Rows) + { + obj.Add(new CustomerTransaction + { + Id = Convert.ToString(item["Id"]), + Amount = Convert.ToString(item["Amount"]), + PaymentMethod = Convert.ToString(item["PaymentMethod"]), + PBankName = Convert.ToString(item["PBankName"]), + PCurrency = Convert.ToString(item["PCurrency"]), + TransactionDay = Convert.ToString(item["TransactionDay"]), + TransactionMonth = Convert.ToString(item["TransactionMonth"]), + Status = Convert.ToString(item["Status"]) + }); + } + _response.CustomerTransaction = obj; + } + } + catch (Exception ex) + { + _response.ResponseCode = ResponseHelper.EXCEPTION; + _response.ResponseMessage = "Exception occured: " + ex.Message; + + Log.Error("ACCOUNTREPOSITORY | GETCUSTOMERTRANSACTIONLIST | EXCEPTION | " + JsonConvert.SerializeObject(_response)); + } + return Task.FromResult(_response); + } + + public Task GetDynamicTable(string flag) + { + CommonResponse _response = new CommonResponse(); + try + { + var sql = "EXEC PROC_DYNAMIC_TABLE"; + sql += " @Flag = " + _dbHelper.FilterString(flag); + + Log.Debug("ACCOUNTREPOSITORY | GETDYNAMICTABLE | SQL | " + sql); + var dt = _dbHelper.ExecuteDataTable(sql); + + if (dt == null || dt.Rows.Count <= 0) + { + _response.ResponseCode = ResponseHelper.FAILED; + _response.ResponseMessage = "DB Null Error!"; + + Log.Error("ACCOUNTREPOSITORY | GETDYNAMICTABLE | DB RESPONSE | " + JsonConvert.SerializeObject(_response)); + } + else + { + _response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]); + _response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]); + + if (_response.ResponseCode == ResponseHelper.SUCCESS) + { + _response.Data = Utilities.ParseTableData(flag, dt); + } + } + } + catch (Exception ex) + { + _response.ResponseCode = ResponseHelper.EXCEPTION; + _response.ResponseMessage = "Exception occured: " + ex.Message; + + Log.Error("ACCOUNTREPOSITORY | GETDYNAMICTABLE | EXCEPTION | " + JsonConvert.SerializeObject(_response)); + } + return Task.FromResult(_response); + } } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/IAccountRepository.cs b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/IAccountRepository.cs index 01e0df1..24160e3 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/IAccountRepository.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/Repository/Account/IAccountRepository.cs @@ -1,9 +1,14 @@ -using CustomerOnlineRemit.Common.Model.Account; +using CustomerOnlineRemit.Common.Model; +using CustomerOnlineRemit.Common.Model.Account; +using CustomerOnlineRemit.Common.Model.Customer; namespace CustomerOnlineRemit.Repository.Repository.Account { public interface IAccountRepository { Task DoLoginAsync(LoginModel loginModel); + Task GetDynamicTable(string flag); + Task GetCustomerReceiverList(bool ShowAll); + Task GetCustomerTransactionList(bool ShowAll); } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll index 4826301..dbe8eb5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb index 5d33f2b..3873125 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Common.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll index 325a080..85266e9 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb index bcf9beb..0104e1e 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/bin/Debug/net7.0/CustomerOnlineRemit.Repository.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.csproj.AssemblyReference.cache b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.csproj.AssemblyReference.cache index 7b0ce43..00efa9c 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.csproj.AssemblyReference.cache and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.csproj.AssemblyReference.cache differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.dll index 325a080..85266e9 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.pdb b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.pdb index bcf9beb..0104e1e 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.pdb and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/CustomerOnlineRemit.Repository.pdb differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/ref/CustomerOnlineRemit.Repository.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/ref/CustomerOnlineRemit.Repository.dll index 19a7429..887bae5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/ref/CustomerOnlineRemit.Repository.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/ref/CustomerOnlineRemit.Repository.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/refint/CustomerOnlineRemit.Repository.dll b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/refint/CustomerOnlineRemit.Repository.dll index 19a7429..887bae5 100644 Binary files a/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/refint/CustomerOnlineRemit.Repository.dll and b/CustomerOnlineRemit/CustomerOnlineRemit.Repository/obj/Debug/net7.0/refint/CustomerOnlineRemit.Repository.dll differ diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/CustomButton.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/CustomButtonComponent.razor similarity index 100% rename from CustomerOnlineRemit/CustomerOnlineRemit/Components/CustomButton.razor rename to CustomerOnlineRemit/CustomerOnlineRemit/Components/CustomButtonComponent.razor diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/ReceiverListComponent.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/ReceiverListComponent.razor new file mode 100644 index 0000000..9f7d0cf --- /dev/null +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Components/ReceiverListComponent.razor @@ -0,0 +1,83 @@ +
+
+

My Receivers

+
+ + +
+
+
Name
+
Send Transaction
+
Country
+
Transaction Type
+
+
+ + +
+ @if (IsLoading) + { +
+
+
+
+
+
+
+ } + else + { + @if (customerReceiver == null || customerReceiver.ReceiverModel == null || customerReceiver.ReceiverModel.Count <= 0) + { +
+
+
No Data To Display!
+
+
+ } + else + { +
+
+ @foreach (var receiver in customerReceiver.ReceiverModel) + { +
@receiver.Name @receiver.Mobile
+ +
@receiver.Country
+
@receiver.TransactionType
+ } +
+
+ } + } +
+ + + + +
+ +@code { + [Parameter] public bool IsLoading { get; set; } + [Parameter] public bool ShowAll { get; set; } + private CustomerReceiverModel customerReceiver; + + protected override async Task OnInitializedAsync() + { + IsLoading = true; + await Task.Delay(2000); + customerReceiver = await service.GetCustomerReceiverList(ShowAll); + if (customerReceiver.ResponseCode != ResponseHelper.SUCCESS) + { + toastAlert.ShowMessage(customerReceiver, ToastService); + } + IsLoading = false; + } +} diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/TableComponent.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/TableComponent.razor new file mode 100644 index 0000000..5d579c5 --- /dev/null +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Components/TableComponent.razor @@ -0,0 +1,134 @@ +@typeparam TItem +@using System.Reflection + +
+
+

@ReportTitle

+
+ @if (!string.IsNullOrEmpty(CustomLink)) + { + + } + +
+
+ @if (columnDefinitions != null && columnDefinitions.Count > 0) + { + count = 1; + @foreach (var column in columnDefinitions) + { +
@column.Header
+ count++; + } + } +
+
+ +
+ @if (IsLoading) + { +
+
+
+
+
+
+
+ } + else if (dataApi != null && dataApi.Count > 0) + { + count = 1; + @foreach (var item in dataApi) + { +
+
+ @foreach (var column in columnDefinitions) + { + if (ShowModal) + { +
@column.GetValue(item)
+ } + else + { +
@column.GetValue(item)
+ } + } +
+
+ count++; + } + } +
+ @if (!string.IsNullOrEmpty(ViewAllLink)) + { + + } +
+ + +@code { + [Parameter] public string? CustomLink { get; set; } + [Parameter] public string? IdField { get; set; } + [Parameter] public string? SkipColumns { get; set; } + [Parameter] public string? CustomLinkTitle { get; set; } + [Parameter] public string? ReportTitle { get; set; } + [Parameter] public string? TableFlag { get; set; } + [Parameter] public bool IsLoading { get; set; } + [Parameter] public bool ShowModal { get; set; } + [Parameter] public string? ModalId { get; set; } + [Parameter] public string? ViewAllTitle { get; set; } + [Parameter] public string? ViewAllLink { get; set; } + [Parameter] public int count { get; set; } + + [Parameter] + public List data { get; set; } + + private List dataApi; + + private List.ColumnDefinition> columnDefinitions; + + public class ColumnDefinition + { + public string Header { get; set; } + public Func GetValue { get; set; } + } + + protected override async Task OnInitializedAsync() + { + IsLoading = true; + await Task.Delay(2000); + var response = await service.GetDynamicTable(TableFlag); + if (response.ResponseCode != ResponseHelper.SUCCESS) + { + toastAlert.ShowMessage(response, ToastService); + } + dataApi = new List(response.Data); + columnDefinitions = GenerateColumnDefinitions(response.Data[0]); + IsLoading = false; + } + + private List.ColumnDefinition> GenerateColumnDefinitions(dynamic item) + { + List.ColumnDefinition> columns = new List.ColumnDefinition>(); + var skipColumns = SkipColumns.Split(",").ToList(); + PropertyInfo[] properties = item.GetType().GetProperties(); + + foreach (PropertyInfo property in properties) + { + if (!skipColumns.Contains(property.Name)) // Check if the column should be skipped + { + columns.Add(new TableComponent.ColumnDefinition + { + Header = property.Name, + GetValue = i => property.GetValue(i) + }); + } + } + + return columns; + } +} \ No newline at end of file diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/ToastAlert.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/ToastAlertComponent.razor similarity index 100% rename from CustomerOnlineRemit/CustomerOnlineRemit/Components/ToastAlert.razor rename to CustomerOnlineRemit/CustomerOnlineRemit/Components/ToastAlertComponent.razor diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/TransactionListComponent.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/TransactionListComponent.razor new file mode 100644 index 0000000..8ee5e49 --- /dev/null +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Components/TransactionListComponent.razor @@ -0,0 +1,82 @@ +
+
+

My Transactions

+
+
+
+
Date
+
Description
+
Quick Send
+
Status
+
Amount
+
+
+ + +
+ @if (IsLoading) + { +
+
+
+
+
+
+
+ } + else + { + @if (customerTransaction == null || customerTransaction.CustomerTransaction == null || customerTransaction.CustomerTransaction.Count <= 0) + { +
+
+
No Data To Display!
+
+
+ } + else + { +
+
+
+ @foreach (var transaction in customerTransaction.CustomerTransaction) + { +
@transaction.TransactionDay @transaction.TransactionMonth
+
HDFC Bank @transaction.PaymentMethod
+ +
@transaction.Status
+
-@transaction.Amount (@transaction.PCurrency)
+ } +
+
+
+ } + } +
+ + + + +
+ +@code { + [Parameter] public bool IsLoading { get; set; } + [Parameter] public bool ShowAll { get; set; } + private CustomerTransactionList customerTransaction; + + protected override async Task OnInitializedAsync() + { + IsLoading = true; + await Task.Delay(2000); + customerTransaction = await service.GetCustomerTransactionList(ShowAll); + if (customerTransaction.ResponseCode != ResponseHelper.SUCCESS) + { + toastAlert.ShowMessage(customerTransaction, ToastService); + } + IsLoading = false; + } +} diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Components/UserLeftView.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Components/UserLeftView.razor deleted file mode 100644 index f16b247..0000000 --- a/CustomerOnlineRemit/CustomerOnlineRemit/Components/UserLeftView.razor +++ /dev/null @@ -1,5 +0,0 @@ -

UserLeftView

- -@code { - -} diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/AccountServices.cs b/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/AccountServices.cs index 5dc17d5..b2092cd 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/AccountServices.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/AccountServices.cs @@ -2,6 +2,7 @@ using CustomerOnlineRemit.Business.Business.Account; using CustomerOnlineRemit.Common.Model; using CustomerOnlineRemit.Common.Model.Account; +using CustomerOnlineRemit.Common.Model.Customer; using Microsoft.AspNetCore.Components.Authorization; namespace CustomerOnlineRemit.Data.Account @@ -21,14 +22,6 @@ namespace CustomerOnlineRemit.Data.Account public async Task DoLoginAsync(LoginModel loginModel) { - //var myContent = JsonConvert.SerializeObject(loginModel); - //var buffer = System.Text.Encoding.UTF8.GetBytes(myContent); - //var byteContent = new ByteArrayContent(buffer); - //HttpResponseMessage response = await _httpClient.PostAsJsonAsync("api/auth/login", loginModel); - //response.EnsureSuccessStatusCode(); - - //string data = await response.Content.ReadAsStringAsync(); - var response = await _accountBusiness.DoLoginAsync(loginModel); if (response.ResponseCode == ResponseHelper.SUCCESS) { @@ -40,5 +33,20 @@ namespace CustomerOnlineRemit.Data.Account } return response; } + + public async Task GetDynamicTable(string Flag) + { + return await _accountBusiness.GetDynamicTable(Flag); + } + + public async Task GetCustomerReceiverList(bool ShowAll) + { + return await _accountBusiness.GetCustomerReceiverList(ShowAll); + } + + public async Task GetCustomerTransactionList(bool ShowAll) + { + return await _accountBusiness.GetCustomerTransactionList(ShowAll); + } } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/IAccountServices.cs b/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/IAccountServices.cs index 1a670e3..87d6f78 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/IAccountServices.cs +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Data/Account/IAccountServices.cs @@ -1,10 +1,14 @@ using CustomerOnlineRemit.Common.Model; using CustomerOnlineRemit.Common.Model.Account; +using CustomerOnlineRemit.Common.Model.Customer; namespace CustomerOnlineRemit.Data.Account { public interface IAccountServices { Task DoLoginAsync(LoginModel loginModel); + Task GetDynamicTable(string Flag); + Task GetCustomerReceiverList(bool ShowAll); + Task GetCustomerTransactionList(bool ShowAll); } } diff --git a/CustomerOnlineRemit/CustomerOnlineRemit/Pages/Dashboard.razor b/CustomerOnlineRemit/CustomerOnlineRemit/Pages/Dashboard.razor index 1fc0edf..1ff6250 100644 --- a/CustomerOnlineRemit/CustomerOnlineRemit/Pages/Dashboard.razor +++ b/CustomerOnlineRemit/CustomerOnlineRemit/Pages/Dashboard.razor @@ -1,6 +1,9 @@ @layout MainLayout @page "/dashboard" @attribute [Authorize] +@inject IJSRuntime JSRuntime +@inherits LayoutComponentBase +
@@ -77,191 +80,101 @@
- -
-

My Transactions

- - -
-
-
Date
-
Description
-
Quick Send
-
Status
-
Amount
- -
-
- - -
-
-
-
16 APR
-
HDFC Bank Cash collection
- - -
Processing
-
- $562 (USD)
-
-
-
-
-
16 APR
-
Global IME Bank Bank Deposit
- - -
Paid
-
- $562 (USD)
-
-
- -
- - -