Browse Source

#13713 - Agent Self Login

master
binita 1 year ago
parent
commit
008bce359d
  1. 18
      Business/Business.csproj
  2. 7
      Common/Common.csproj
  3. 56
      Common/Helper/GetStatic.cs
  4. 86
      JMEAgentSystem/JMEAgentSystem.csproj
  5. 2
      JMEAgentSystem/JMEAgentSystem.csproj.user
  6. 562
      JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js
  7. 14
      JMEAgentSystem/Scripts/SendTxnJs/SendTxnInfo.js
  8. 207
      JMEAgentSystem/Scripts/SendTxnJs/cddiData.js
  9. 1
      JMEAgentSystem/Site.Master
  10. 27
      JMEAgentSystem/Web.config
  11. 2
      JMEAgentSystem/WebPages/SendTxn/PrintSendMoneyRequestDetails.aspx.cs
  12. 119
      JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx
  13. 676
      JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.cs
  14. 222
      JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.designer.cs
  15. 60
      Repository/DAO/SendTxnIRHDao/SendTxnIRHDao.cs
  16. 5
      Repository/Model/SendTransactionModel.cs
  17. 7
      Repository/Repository.csproj

18
Business/Business.csproj

@ -12,6 +12,7 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<WebGreaseLibPath>..\packages\WebGrease.1.5.2\lib</WebGreaseLibPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -31,20 +32,32 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Antlr3.Runtime, Version=3.4.1.9004, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WebGrease, Version=1.5.2.14234, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Account\AccountServices.cs" />
@ -70,6 +83,7 @@
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

7
Common/Common.csproj

@ -33,8 +33,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Select.HtmlToPdf, Version=20.1.0.0, Culture=neutral, PublicKeyToken=e0ae9f6e27a97018, processorArchitecture=MSIL">
<HintPath>..\packages\Select.HtmlToPdf.20.1.0\lib\net40\Select.HtmlToPdf.dll</HintPath>
@ -50,6 +50,9 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WebGrease">
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Helper\GetStatic.cs" />

56
Common/Helper/GetStatic.cs

@ -1,7 +1,10 @@
using Common.Model;
using Common.Utility;
using SelectPdf;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.IO;
@ -549,5 +552,58 @@ namespace Common.Helper
{
return HttpContext.Current.Session.SessionID;
}
public static string ParseResultJsPrint(DbResult dbResult)
{
return dbResult.ErrorCode + "-:::-" + dbResult.Msg.Replace("'", "").Replace("<br/>", "").Replace(System.Environment.NewLine, "") + "-:::-" + dbResult.Id;
}
public static string PutRedBackGround(string mes)
{
return "<span style = \"background-color : red\">" + mes + "</span>";
}
public static string DataSetToJSON(DataSet ds)
{
ArrayList root = new ArrayList();
List<Dictionary<string, object>> table;
Dictionary<string, object> data;
foreach (DataTable dt in ds.Tables)
{
table = new List<Dictionary<string, object>>();
foreach (DataRow dr in dt.Rows)
{
data = new Dictionary<string, object>();
foreach (DataColumn col in dt.Columns)
{
data.Add(col.ColumnName, dr[col]);
}
table.Add(data);
}
root.Add(table);
}
JavaScriptSerializer serializer = new JavaScriptSerializer();
return serializer.Serialize(root);
}
public static DataTable ToDataTable<T>(this IList<T> data)
{
PropertyDescriptorCollection props =
TypeDescriptor.GetProperties(typeof(T));
DataTable table = new DataTable();
for (int i = 0; i < props.Count; i++)
{
PropertyDescriptor prop = props[i];
table.Columns.Add(prop.Name, prop.PropertyType);
}
object[] values = new object[props.Count];
foreach (T item in data)
{
for (int i = 0; i < values.Length; i++)
{
values[i] = props[i].GetValue(item);
}
table.Rows.Add(values);
}
return table;
}
}
}

86
JMEAgentSystem/JMEAgentSystem.csproj

@ -53,19 +53,55 @@
<Reference Include="Autofac.Integration.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.Web.4.0.0\lib\net45\Autofac.Integration.Web.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.3\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.3\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Cookies, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Security.Facebook, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.Facebook.3.0.1\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Google, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.Google.3.0.1\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.MicrosoftAccount.3.0.1\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Twitter, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.Twitter.3.0.1\lib\net45\Microsoft.Owin.Security.Twitter.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Http">
<HintPath>..\packages\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
@ -96,13 +132,6 @@
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
@ -114,6 +143,9 @@
<Reference Include="Microsoft.AspNet.FriendlyUrls">
<HintPath>..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="EntityFramework">
@ -122,45 +154,12 @@
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Owin">
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.EntityFramework">
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.2\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="System.Web.Providers">
<HintPath>..\packages\Microsoft.AspNet.Providers.Core.2.0.0\lib\net40\System.Web.Providers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin">
<HintPath>..\packages\Microsoft.Owin.4.0.0\lib\net451\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Host.SystemWeb">
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.4.0.0\lib\net451\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security">
<HintPath>..\packages\Microsoft.Owin.Security.4.0.0\lib\net451\Microsoft.Owin.Security.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Cookies">
<HintPath>..\packages\Microsoft.Owin.Security.Facebook.4.0.0\lib\net451\Microsoft.Owin.Security.Facebook.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Cookies">
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.4.0.0\lib\net451\Microsoft.Owin.Security.Cookies.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Google">
<HintPath>..\packages\Microsoft.Owin.Security.Google.4.0.0\lib\net451\Microsoft.Owin.Security.Google.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.Twitter">
<HintPath>..\packages\Microsoft.Owin.Security.Twitter.4.0.0\lib\net451\Microsoft.Owin.Security.Twitter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount">
<HintPath>..\packages\Microsoft.Owin.Security.MicrosoftAccount.4.0.0\lib\net451\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security.OAuth">
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.4.0.0\lib\net451\Microsoft.Owin.Security.OAuth.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
@ -346,6 +345,7 @@
<Content Include="Scripts\functions.js" />
<Content Include="Scripts\js\swift_autocomplete.js" />
<Content Include="Scripts\Receiver\ReceiverRegistrationNew.js" />
<Content Include="Scripts\SendTxnJs\cddiData.js" />
<Content Include="Scripts\SendTxnJs\customerData.js" />
<Content Include="Scripts\SendTxnJs\ReceiverData.js" />
<Content Include="Scripts\SendTxnJs\SendMoneyRequest.js" />

2
JMEAgentSystem/JMEAgentSystem.csproj.user

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup>

562
JMEAgentSystem/Scripts/SendTxnJs/SendMoneyRequest.js

@ -32,37 +32,38 @@ $(document).ready(function () {
$("#searchStatement").attr("disabled", "disabled");
var dataToSend = { MethodName: "loadCustomerDataSendPage", CustomerIdNumber: customerIdNumber };
var options =
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
success: function (response) {
$("#searchCustomer").removeAttr("disabled");
if (response[0].errorCode === 0) {
$('#step2SendRemittance').show();
$('#step2SendRemittanceCustomer').show();
$('#step2SendRemittanceAgreement').show();
$('#signatureDiv').show();
$('#step2SendRemittanceSaveButton').show();
$("#" + mId + "customerName").text(response[0].CUSTOMERNAME);
$("#" + mId + "membershiId").text(response[0].MEMBERSHIPID);
CustomerSignature();
ParseDDlDynamic(response, 'ddlBenedeciary', 'FULLNAME', 'RECEIVERID', 'Select Beneficiary');
}
else {
alert(response[0].Msg);
$('#step2SendRemittance').hide();
$('#step2SendRemittanceCustomer').hide();
$('#step2SendRemittanceAgreement').hide();
$('#signatureDiv').hide();
$('#step2SendRemittanceSaveButton').hide();
$("#" + mId + "senderIdNumber").val('');
$("#" + mId + "senderIdNumber").focus();
}
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
success: function (response) {
$("#searchCustomer").removeAttr("disabled");
if (response[0].errorCode === 0) {
$('#step2SendRemittance').show();
$('#step2SendRemittanceCustomer').show();
$('#step2SendRemittanceAgreement').show();
$('#signatureDiv').show();
$('#step2SendRemittanceSaveButton').show();
$("#" + mId + "customerName").text(response[0].CUSTOMERNAME);
$("#" + mId + "membershiId").text(response[0].MEMBERSHIPID);
$("#" + mId + "hdnCustomerId").val(response[0].CUSTOMERID);
CustomerSignature();
ParseDDlDynamic(response, 'ddlBenedeciary', 'FULLNAME', 'RECEIVERID', 'Select Beneficiary');
}
else {
alert(response[0].Msg);
$('#step2SendRemittance').hide();
$('#step2SendRemittanceCustomer').hide();
$('#step2SendRemittanceAgreement').hide();
$('#signatureDiv').hide();
$('#step2SendRemittanceSaveButton').hide();
$("#" + mId + "senderIdNumber").val('');
$("#" + mId + "senderIdNumber").focus();
}
};
}
};
$.ajax(options);
});
$("#MainContent_TransactionAgreement").click(function () {
@ -82,67 +83,67 @@ $(document).ready(function () {
var dataToSend = { MethodName: "getBenefeciaryDetails", BenefeciaryId: benefeciaryId };
var options =
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
success: function (response) {
if (response[0].errorCode === 0) {
$("#" + mId + "receiverFullName").val(response[0].fullName);
$("#" + mId + "receiveraddress").val(response[0].address);
$("#" + mId + "receiverMobileNumber").val(response[0].mobile);
$("#" + mId + "purpose").val(response[0].address);
$("#" + mId + "relationship").val(response[0].address);
$("#" + mId + "accountNo").val(response[0].receiverAccountNo);
if (response[0].relationship === '11339') {
$("#" + mId + "otherRelationshipTextBox").val(response[0].relationOther);
$('#otherRelationDiv').show();
}
if (response[0].purposeOfRemit === '11347') {
$('#purposeOtherDiv').show();
$("#" + mId + "purposeOther").val(response[0].purposeOther);
}
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
success: function (response) {
if (response[0].errorCode === 0) {
$("#" + mId + "receiverFullName").val(response[0].fullName);
$("#" + mId + "receiveraddress").val(response[0].address);
$("#" + mId + "receiverMobileNumber").val(response[0].mobile);
$("#" + mId + "purpose").val(response[0].address);
$("#" + mId + "relationship").val(response[0].address);
$("#" + mId + "accountNo").val(response[0].receiverAccountNo);
if (response[0].relationship === '11339') {
$("#" + mId + "otherRelationshipTextBox").val(response[0].relationOther);
$('#otherRelationDiv').show();
}
if (response[0].purposeOfRemit === '11347') {
$('#purposeOtherDiv').show();
$("#" + mId + "purposeOther").val(response[0].purposeOther);
}
if ($.isNumeric(response[0].purposeOfRemit)) {
SetDDLValueSelected(mId + "purpose", response[0].purposeOfRemit);
} else {
SetDDLTextSelected(mId + "purpose", response[0].purposeOfRemit);
}
if ($.isNumeric(response[0].relationship)) {
SetDDLValueSelected(mId + "relationship", response[0].relationship);
} else {
SetDDLTextSelected(mId + "relationship", response[0].relationship);
}
SetDDLTextSelected(mId + "pCountry", response[0].country);
if ($.isNumeric(response[0].purposeOfRemit)) {
SetDDLValueSelected(mId + "purpose", response[0].purposeOfRemit);
} else {
SetDDLTextSelected(mId + "purpose", response[0].purposeOfRemit);
}
if ($.isNumeric(response[0].relationship)) {
SetDDLValueSelected(mId + "relationship", response[0].relationship);
} else {
SetDDLTextSelected(mId + "relationship", response[0].relationship);
}
SetDDLTextSelected(mId + "pCountry", response[0].country);
PcountryOnChange('c', response[0].paymentMethod.toUpperCase(), response[0].bankId);
PcountryOnChange('c', response[0].paymentMethod.toUpperCase(), response[0].bankId);
if (response[0].branchDetails) {
if (response[0].manualType === 'Y') {
$("#" + mId + "branch_manual").val(response[0].branchDetails);
}
else {
var dataSelectDDL = {
id: response[0].branchDetails.split('|')[0],
text: response[0].branchDetails.split('|')[1]
};
if (dataSelectDDL.id !== 'N/A') {
var newOption = new Option(dataSelectDDL.text, dataSelectDDL.id, false, false);
$('.js-example-basic-single').append(newOption).trigger('change');
$('.js-example-basic-single').val(dataSelectDDL.id); // Select the option with a value of '1'
$('.js-example-basic-single').trigger('change');
}
if (response[0].branchDetails) {
if (response[0].manualType === 'Y') {
$("#" + mId + "branch_manual").val(response[0].branchDetails);
}
else {
var dataSelectDDL = {
id: response[0].branchDetails.split('|')[0],
text: response[0].branchDetails.split('|')[1]
};
if (dataSelectDDL.id !== 'N/A') {
var newOption = new Option(dataSelectDDL.text, dataSelectDDL.id, false, false);
$('.js-example-basic-single').append(newOption).trigger('change');
$('.js-example-basic-single').val(dataSelectDDL.id); // Select the option with a value of '1'
$('.js-example-basic-single').trigger('change');
}
}
ShowHideAccountNo();
}
else {
alert(response[0].Msg);
}
ShowHideAccountNo();
}
};
else {
alert(response[0].Msg);
}
}
};
$.ajax(options);
});
$("#" + mId + "purpose").on("change", function () {
@ -265,6 +266,7 @@ function ResetAmountFields() {
//GetElement("spnSchemeOffer").innerHTML = "";
//GetElement("spnWarningMsg").innerHTML = "";
}
function PcountryOnChange(obj, pmode, pAgentSelected = "") {
var pCountry = $("#" + mId + "pCountry").val();
if (pCountry === "" || pCountry === null)
@ -277,37 +279,37 @@ function PcountryOnChange(obj, pmode, pAgentSelected = "") {
if (obj === 'pcurr') {
method = "PCurrPcountry";
}
var dataToSend = { MethodName: method, pCountry: pCountry };
var options =
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
if (obj === 'c') {
LoadPayMode(response, document.getElementById(mId + "pMode"), 'pcurr', "", pmode);
ReceivingModeOnChange("", pAgentSelected);
GetPayoutPartner(response[0].serviceTypeId);
CheckForBranchShowIde();
}
else if (obj === 'pcurr') {
if (response === "")
return false;
$("#" + mId + "lblPayCurr").text(response[0].currencyCode);
$("#" + mId + "lblExCurr").text(response[0].currencyCode);
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
if (obj === 'c') {
LoadPayMode(response, document.getElementById(mId + "pMode"), 'pcurr', "", pmode);
ReceivingModeOnChange("", pAgentSelected);
GetPayoutPartner(response[0].serviceTypeId);
CheckForBranchShowIde();
}
else if (obj === 'pcurr') {
if (response === "")
return false;
$("#" + mId + "lblPayCurr").text(response[0].currencyCode);
$("#" + mId + "lblExCurr").text(response[0].currencyCode);
return true;
}
return true;
},
error: function (result) {
alert("Due to unexpected errors we were unable to load data");
}
};
return true;
},
error: function (result) {
alert("Due to unexpected errors we were unable to load data");
}
};
$.ajax(options);
}
@ -363,6 +365,7 @@ function LoadLocationDDL(response) {
LoadSublocation();
}
}
function LoadPayMode(response, myDDL, recall, selectField, obj) {
var data = response;
//CheckSession(data);
@ -392,11 +395,13 @@ function LoadPayMode(response, myDDL, recall, selectField, obj) {
SetDDLTextSelected(mId + "pMode", obj);
}
}
function ReceivingModeOnChange(pModeSelected, pAgentSelected) {
ResetAmountFields();
$("#" + mId + "pAgent").empty();
PaymentModeChange(pModeSelected, pAgentSelected);
}
function PaymentModeChange(pModeSelected, pAgentSelected) {
var pMode = "";
if (pModeSelected === "" || pModeSelected === null)
@ -417,27 +422,28 @@ function PaymentModeChange(pModeSelected, pAgentSelected) {
}
var dataToSend = { MethodName: "loadAgentBank", pMode: pMode, pCountry: pCountry };
var options =
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
//LoadAgentSetting();
ParseLoadDDl(response, GetElement(mId + "pAgent"), 'agentSelection', "");
if (pAgentSelected !== "" && pAgentSelected !== null && pAgentSelected !== undefined) {
SetDDLValueSelected(mId + "pAgent", pAgentSelected);
}
var agentId = $("#" + mId + "pAgent").val();
if (agentId !== "" && agentId !== null && agentId !== undefined) {
var payMode = $("#" + mId + "pMode").val();
$('.same').show();
}
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
//LoadAgentSetting();
ParseLoadDDl(response, GetElement(mId + "pAgent"), 'agentSelection', "");
if (pAgentSelected !== "" && pAgentSelected !== null && pAgentSelected !== undefined) {
SetDDLValueSelected(mId + "pAgent", pAgentSelected);
}
};
var agentId = $("#" + mId + "pAgent").val();
if (agentId !== "" && agentId !== null && agentId !== undefined) {
var payMode = $("#" + mId + "pMode").val();
$('.same').show();
}
}
};
$.ajax(options);
}
function ParseLoadDDl(response, myDDL, recall, selectField) {
var data = response;
//CheckSession(data);
@ -498,6 +504,7 @@ function ParseLoadDDl(response, myDDL, recall, selectField) {
var pCountry = $("#" + mId + "pCountry option:selected").text();
var pCurr = $("#" + mId + "lblPayCurr").text();
}
function ClearCalculatedAmount() {
$("#" + mId + "txtCollAmt").val('');
$("#" + mId + "lblSendAmt").val(0);
@ -506,6 +513,7 @@ function ClearCalculatedAmount() {
$("#" + mId + "txtPayAmt").val('');
$("#" + mId + "customerRateFields").hide();
}
function GetPayoutPartner(payMode) {
var pCountry = $("#" + mId + "pCountry").val();
var pMode = $("#" + mId + "pMode").val();
@ -597,6 +605,7 @@ function ParseBranchDDl(response, myDDL, recall, selectField) {
}
}
}
function CollAmtOnChange() {
var collAmt = $("#" + mId + "txtCollAmt").val();
if (collAmt === "")
@ -610,6 +619,7 @@ function CollAmtOnChange() {
}
checkdata(collAmt, 'cAmt');
}
function CurrencyFormatted(amount) {
var i = parseFloat(amount);
if (isNaN(i)) { i = 0.00; }
@ -628,6 +638,7 @@ function CurrencyFormatted(amount) {
return CommaFormatted(s, amount);
}
function CommaFormatted(amount, amountMain) {
var delimiter = ",";
var a = amount.split('.', 2);
@ -656,13 +667,13 @@ function CommaFormatted(amount, amountMain) {
return amount;
}
function checkdata(amt, obj) {
if (amt > 0)
CalculateTxn(amt, obj);
else
ClearCalculatedAmount();
}
function CalculateTxn(amt, obj, isManualSc) {
var collAmt = parseFloat($("#" + mId + "txtCollAmt").val().replace(',', '').replace(',', '').replace(',', ''));
@ -772,20 +783,21 @@ function CalculateTxn(amt, obj, isManualSc) {
};
var options =
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
ParseCalculateData(response, obj);
}
};
{
url: '',
data: dataToSend,
dataType: 'JSON',
type: 'POST',
async: false,
success: function (response) {
ParseCalculateData(response, obj);
}
};
$.ajax(options);
$("#DivLoad").hide();
return true;
}
function ParseCalculateData(response, amtType) {
var data = response;
if (data[0].ErrCode === '1') {
@ -830,6 +842,7 @@ function ParseCalculateData(response, amtType) {
}
}
function roundNumber(rnum, rlength) { // Arguments: number to round, number of decimal places
var newnumber = Math.round(rnum * Math.pow(10, rlength)) / Math.pow(10, rlength);
return parseFloat(newnumber); // Output the result to the form field (change for your purposes)
@ -838,7 +851,9 @@ function roundNumber(rnum, rlength) { // Arguments: number to round, number of d
function ValidateDetailsMain() {
var isFormDataValid = ValidateDetails();
if (isFormDataValid === true) {
return CheckSignatureCustomerFromCustomerRegister();
// return CheckSignatureCustomerFromCustomerRegister();
// return true;
SendTransactionJS();
}
else {
return false;
@ -899,36 +914,11 @@ function ValidateDetails() {
return true;
}
}
function SetMessageBox(msg, errorCode) {
alert(msg);
}
function VerifyDetails() {
var dataToSend = {
Methodname: 'ValidateDetails'
, membershipId: $("#" + mId + "senderIdNumber").val()
, receiverName: $("#" + mId + "receiverFullName").val()
}
$.post('', dataToSend, function (response) {
var data = JSON.parse(response);
if (data[0].ERROR_CODE == '0') {
var pMode = $("#" + mId + "pMode").val();
var pgent = $("#" + mId + "pAgent").val();
var pbranch = $("#" + mId + "branch").val();
$("#" + mId + "hddPmode").val(pMode);
$("#" + mId + "hddPagent").val(pgent);
$("#" + mId + "hddpBranch").val(pbranch);
return true;
} else {
alert(data[0].Msg);
return false;
}
}).fail(function (response) {
return false;
});
}
function SetDDLValueSelected(ddl, selectText) {
$("#" + ddl + " option").each(function () {
if ($(this).val() === $.trim(selectText)) {
@ -938,26 +928,6 @@ function SetDDLValueSelected(ddl, selectText) {
});
}
function ClearAllData() {
$("#" + mId + "receiverFullName").val('');
$("#" + mId + "receiveraddress").val('');
$("#" + mId + "receiverMobileNumber").val('');
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "purposeOther").val('');
$("#" + mId + "otherRelationshipTextBox").val('');
$('#otherRelationDiv').hide();
$('#purposeOtherDiv').hide();
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "pCountry").val('');
$("#" + mId + "pAgent").empty();
$("#" + mId + "branch").empty();
SetDDLTextSelected(mId + "pCountry", '');
ClearCalculatedAmount();
}
function CheckForMobileNumber(nField, fieldName) {
var numberPattern = /^[+]?[0-9]{6,16}$/;
test = numberPattern.test(nField.value);
@ -1006,4 +976,222 @@ function SetPayCurrency(pCountry) {
}
};
$.ajax(options);
}
}
$(document).on('click', '#calc', function () {
if (ValidateDetailsMain() == "true") {
SendTransactionJS();
}
/* GetAdditionalCDDIForm();*/
});
function SendTransactionJS() {
var idNumber = $("#" + mId + "senderIdNumber").val();
var receiverFullNameValue = $("#" + mId + "receiverFullName").val();
var receiveraddressValue = $("#" + mId + "receiveraddress").val();
var receiverMobileNumberValue = $("#" + mId + "receiverMobileNumber").val();
var pCountryId = $("#" + mId + "pCountry").val();
var pmodeId = $("#" + mId + "pMode").val();
var pagentId = $("#" + mId + "pAgent").val();
var branchId = $("#" + mId + "branch").val();
var accountnoValue = $("#" + mId + "accountNo").val();
var cAmt = $("#" + mId + "txtCollAmt").val();
var tamt = $("#" + mId + "lblSendAmt").val();
var serviceCharge = $("#" + mId + "lblServiceChargeAmt").val();
var purposeOfRemittanceId = $("#" + mId + "purpose").val();
var otherPurpose = $("#" + mId + "purposeOther").val();
var relationShipId = $("#" + mId + "relationShip").val();
var otherRelation = $("#" + mId + "otherRelationshipTextBox").val();
var referralNameValue = $("#" + mId + "referralName").val();
var collectionMode = $("#" + mId + "ddlCollMode").val();
var deliveryMethod = $("#" + mId + "pMode").val();
var isCDDI = $("#" + mId + "hddIsAdditionalCDDI").val();
var hddAgentRefId = $("#" + mId + "hddAgentRefId").val();
var xmlDataForCDDI = '';
if (isCDDI === 'Y') {
xmlDataForCDDI = GetXMLData();
//sessionStorage.setItem("XmlDataForCDDI", xmlDataForCDDI);
}
var dataToSend = {
MethodName: 'sendTransaction', idNumber: idNumber, receiverFullNameValue: receiverFullNameValue, receiveraddressValue: receiveraddressValue, receiverMobileNumberValue: receiverMobileNumberValue,
pCountryId: pCountryId, pmodeId: pmodeId, pagentId: pagentId, branchId: branchId, accountnoValue: accountnoValue, cAmt: cAmt, tamt: tamt, serviceCharge: serviceCharge, purposeOfRemittanceId: purposeOfRemittanceId,
otherPurpose: otherPurpose, relationShipId: relationShipId, otherRelation: otherRelation, referralNameValue: referralNameValue, collectionMode: collectionMode, deliveryMethod: deliveryMethod,
hddAgentRefId: hddAgentRefId, isCDDI: isCDDI, xmlDataForCDDI: xmlDataForCDDI
};
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
var data = jQuery.parseJSON(response);
if (data[0][0].errorCode !== 0) {
$("#" + mId + "complianceField").show();
$("#" + mId + "divCompliance").show();
if (data[0][0].errorCode == "100") // 100 means ofac
{
var result = data[0][0].id.split('|');
$("#" + mId + "hdnOfacRes").val(result[0]);
$("#" + mId + "hdnOfacReason").val(result[1]);
$("#" + mId + "hdnTrackBy").val(data[0][0].extra);
if (data.table.row.count > 0) {
LoadOfacList(data[0], data[1], data[0][0].receiverFullName);
}
if (data.table.count > 2) {
if (data[3].row.count > 0 && data[2][0].errorCode != "0") {
LoadCompliance(data[2], data[3], "tran"); // add agentRefId
ShowDuplicateTxn(data[5], data[6]);
}
else {
ShowDuplicateTxn(data[3], data[4]);
}
}
}
else if (data[0][0].errorCode == "101" || data[0][0].errorCode == "102" || data[0][0].errorCode == "103") {
ShowDuplicateTxn(data[3], data[4]);
LoadCompliance(data[0], data[1], "questionnaire"); // add agentRefId
}
else {
ShowDuplicateTxn(data[1], data[2]);
}
}
else {
SaveTransaction();
}
// $('#btnSaveAdditionalCDDI').attr('disabled', false);
},
fail: function () {
$('#calc').attr('disabled', false);
alert("Error fetching data");
}
});
}
function ClearAllCustomerInfo() {
$('.infoDiv').css('pointer-events', 'auto');
$('#' + mId + "Manage").hide();
$('#' + mId + "additionalCDDI").hide();
$("#" + mId + "calc").attr('disabled', false);
$("#" + mId + "hddIsAdditionalCDDI").val('N');
$("#" + mId + "hddAgentRefId").val('');
// ClearCDDIInfo();
$("#" + mId + "senderIdNumber").val('');
$("#" + mId + "receiverFullName").val('');
$("#" + mId + "receiveraddress").val('');
$("#" + mId + "receiverMobileNumber").val('');
$("#" + mId + "pCountry").val('');
$("#" + mId + "pmode").val('');
$("#" + mId + "pagent").val('');
$("#" + mId + "branch").val('');
$("#" + mId + "accountno").val('');
$("#" + mId + "txtCollAmt").val('');
$("#" + mId + "lblSendAmt").val('');
$("#" + mId + "lblServiceChargeAmt").val('');
$("#" + mId + "purpose").val('');
$("#" + mId + "purposeOther").val('');
$("#" + mId + "relationShip").val('');
$("#" + mId + "otherRelationshipTextBox").val('');
$("#" + mId + "referralName").val('');
$("#" + mId + "ddlCollMode").val('');
$("#" + mId + "pmode").val('');
}
function ClearAllData() {
$("#" + mId + "receiverFullName").val('');
$("#" + mId + "receiveraddress").val('');
$("#" + mId + "receiverMobileNumber").val('');
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "purposeOther").val('');
$("#" + mId + "otherRelationshipTextBox").val('');
$('#otherRelationDiv').hide();
$('#purposeOtherDiv').hide();
$("#" + mId + "purpose").val('');
$("#" + mId + "relationship").val('');
$("#" + mId + "pCountry").val('');
$("#" + mId + "pAgent").empty();
$("#" + mId + "branch").empty();
SetDDLTextSelected(mId + "pCountry", '');
ClearCalculatedAmount();
}
$(document).on('click', '#btnSendTxnCDDI', function () {
var isValid = 'Y';
$(".requiredCompliance").each(function () {
if (!$.trim($(this).val())) {
$(this).addClass('error');
isValid = 'N';
}
});
if (isValid === 'N') {
return alert("Required Field(s)\n _____________________________ \n The red fields are required!")
}
SaveTransaction();
});
function SaveTransaction() {
var idNumber = $("#" + mId + "senderIdNumber").val();
var receiverFullNameValue = $("#" + mId + "receiverFullName").val();
var receiveraddressValue = $("#" + mId + "receiveraddress").val();
var receiverMobileNumberValue = $("#" + mId + "receiverMobileNumber").val();
var pCountryId = $("#" + mId + "pCountry").val();
var pmodeId = $("#" + mId + "pMode").val();
var pagentId = $("#" + mId + "pAgent").val();
var branchId = $("#" + mId + "branch").val();
var accountnoValue = $("#" + mId + "accountNo").val();
var cAmt = $("#" + mId + "txtCollAmt").val();
var tamt = $("#" + mId + "lblSendAmt").val();
var serviceCharge = $("#" + mId + "lblServiceChargeAmt").val();
var purposeOfRemittanceId = $("#" + mId + "purpose").val();
var otherPurpose = $("#" + mId + "purposeOther").val();
var relationShipId = $("#" + mId + "relationShip").val();
var otherRelation = $("#" + mId + "otherRelationshipTextBox").val();
var referralNameValue = $("#" + mId + "referralName").val();
var collectionMode = $("#" + mId + "ddlCollMode").val();
var deliveryMethod = $("#" + mId + "pMode").val();
var isCDDI = $("#" + mId + "hddIsAdditionalCDDI").val();
var hddAgentRefId = $("#" + mId + "hddAgentRefId").val();
var xmlDataForCDDI = '';
if (isCDDI === 'Y') {
xmlDataForCDDI = GetXMLData();
//sessionStorage.setItem("XmlDataForCDDI", xmlDataForCDDI);
}
var dataToSend = {
MethodName: 'saveTransaction', idNumber: idNumber, receiverFullNameValue: receiverFullNameValue, receiveraddressValue: receiveraddressValue, receiverMobileNumberValue: receiverMobileNumberValue,
pCountryId: pCountryId, pmodeId: pmodeId, pagentId: pagentId, branchId: branchId, accountnoValue: accountnoValue, cAmt: cAmt, tamt: tamt, serviceCharge: serviceCharge, purposeOfRemittanceId: purposeOfRemittanceId,
otherPurpose: otherPurpose, relationShipId: relationShipId, otherRelation: otherRelation, referralNameValue: referralNameValue, collectionMode: collectionMode, deliveryMethod: deliveryMethod,
hddAgentRefId: hddAgentRefId, isCDDI: isCDDI, xmlDataForCDDI: xmlDataForCDDI
};
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
var data = jQuery.parseJSON(response);
//alert(data[0][0].Msg);
if (data.errorCode = "0") {
var id = data.Extra.split('|')[1];
window.location.replace("PrintSendMoneyRequestDetails.aspx?customerId=" + id + "&rowId=" + data.Id);
}
alert(data.Msg);
},
fail: function () {
$('#calc').attr('disabled', false);
alert("Error fetching data");
}
});
}

14
JMEAgentSystem/Scripts/SendTxnJs/SendTxnInfo.js

@ -188,4 +188,16 @@ function LoadCustomerRate() {
};
$.ajax(options);
return true;
}
}
//function ValidateCDDI() {
// var isCDDI = $("#" + mId + "hddIsAdditionalCDDI").val();
// var hddAgentRefId = $("#" + mId + "hddAgentRefId").val();
// var xmlDataForCDDI = '';
// if (isCDDI === 'Y') {
// xmlDataForCDDI = GetXMLData();
// sessionStorage.setItem("XmlDataForCDDI", xmlDataForCDDI);
// }
//}

207
JMEAgentSystem/Scripts/SendTxnJs/cddiData.js

@ -0,0 +1,207 @@
function LoadCompliance(dbResult, complianceTable, complianceType) {
var dataToSend = { MethodName: 'complainceList', dbResult: JSON.stringify(dbResult), complianceTable: JSON.stringify(complianceTable), complianceType: complianceType };
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
var data = jQuery.parseJSON(response);
var c = data.ErrorCode;
var a = c.split('|');
var errorCode = a[0];
var agentRefId = a[1];
ShowCddiData(errorCode, agentRefId, data.Msg, data.Id);
},
fail: function () {
alert("Error fetching data");
}
});
}
function LoadOfacList(dbResult, ofacTable, receiverFullName) {
var dataToSend = { MethodName: 'ofacList', dbResult: JSON.stringify(dbResult), ofacTable: JSON.stringify(ofacTable), receiverFullName: receiverFullName };
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
},
fail: function () {
alert("Error fetching data");
}
});
}
function ShowDuplicateTxn(tranDetail, duplicateTran, receiverFullName) {
var dataToSend = { MethodName: 'showDuplicateTransaction', dbResult: JSON.stringify(tranDetail), ofacTable: JSON.stringify(duplicateTran) };
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
},
fail: function () {
alert("Error fetching data");
}
});
}
function ManageMessage(mes, invoicePrintMode) {
alert("Manage");
debugger;
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
is_mobile = true;
}
window.returnValue = mes + '-:::-' + invoicePrintMode;
if (is_mobile) {
var s = GetBrowserDetails();
if (s.osName == 'iPad' || s.osName == 'iPhone') {
if (s.browserVersion != '0') {
isSafari = true;
isChrome = false;
}
else {
isSafari = false;
isChrome = true;
}
}
if (isSafari) {
window.opener.document.getElementById("confirmHidden").value = mes + '-:::-' + invoicePrintMode;
window.opener.parent.focus();
}
if (isChrome) {
window.opener.document.getElementById("confirmHiddenChrome").value = mes + '-:::-' + invoicePrintMode;
window.opener.document.getElementById("ContentPlaceHolder1_txtPayMsg").focus();
}
window.close();
return true;
}
if (isChrome) {
debugger;
window.opener.focus();
window.opener.PostMessageToParent(window.returnValue);
}
else if (isSafari) {
window.opener.document.getElementById("confirmHidden").value = mes + '-:::-' + invoicePrintMode;
}
window.close();
}
function GetAdditionalCDDIForm(isOnlyVisaStatusQuestionnaire) {
//debugger;
var customerId = $("#" + mId + "hdnCustomerId").val();
$('#additionalCDDI').show();
$('#calc').attr('disabled', true);
$('.infoDiv').css('pointer-events', 'none');
$('.notDisable').css('pointer-events', 'auto');
var dataToSend = { MethodName: 'getAdditionalCDDI', customerId: customerId, IsOnlyVisaStatusQuestionnaire: isOnlyVisaStatusQuestionnaire };
$.ajax({
type: "POST",
data: dataToSend,
async: true,
success: function (response) {
var table = $('#tblComplianceQsn');
table.find("tbody tr").remove();
var result = jQuery.parseJSON(response); //response;
var count = 1;
$.each(result, function (i, d) {
var isRequired = '';
if (d['isRequired'] === 'requiredCompliance')
isRequired = '<span class="ErrMsg">*</span>';
var row = '<tr>';
row += '<td style="display:none">' + d['ID'] + '</td>';
row += '<td>' + count + '</td>';
row += '<td>' + d['QSN'] + ' ' + isRequired + '</td>';
row += '<td width="500px"><input type="text" placeholder="' + d['PlaceHolder'] + '" value="' + d['ANSWER_TEXT'] + '" id="complianceQuestionnare_' + d['ID'] + '" class="form-control ' + d['isRequired'] + '"/></td>';
row += '</tr>';
table.append(row);
count++;
});
},
fail: function () {
$('#calc').attr('disabled', false);
alert("Error fetching data");
}
});
}
function ShowCddiData(errorCode, agentRefId, msg, documentRequired) {
var isOnlyVisaStatusQuestionnaire = 'N';
if (errorCode === "undefined" || errorCode === null || errorCode === "") {
return;
}
else {
// res = id.split('-:::-');
if (errorCode === '1') {
errMsgArr = msg.split('\n');
for (i = 0; i < errMsgArr.length; i++) {
alert(errMsgArr[i]);
}
}
else if (errorCode === '102' || errorCode === '103') {
// alert(res[2]);
alert(' Please fill up the Additional Customer Due Diligence Information (CDDI)');
$('#divHideForVisa').show();
$('#divHideForVisa1').show();
if (errorCode === '102') {
$('#divHideForVisa').hide();
$('#divHideForVisa1').hide();
isOnlyVisaStatusQuestionnaire = 'Y';
}
$("#" + mId + "hddIsAdditionalCDDI").val('Y');
$("#" + mId + "hddAgentRefId").val(agentRefId);
// additional document popup
//$("#" + mId + "hdnIsAdditionalDocumentRequired").val(documentRequired);
//if (documentRequired === 'Y') { //IS DOCUMENT DEQUIRED
// $("#modalAdditionalDocumentRequired").modal('show');
//}
GetAdditionalCDDIForm(isOnlyVisaStatusQuestionnaire);
}
else {
// window.location.replace("/AgentNew/SendTxn/SendIntlReceipt.aspx?controlNo=" + res[2] + "&invoicePrint=" + res[3]);
}
}
};
function GetXMLData() { // json data
var tableRows = $('#tblComplianceQsn tr');
var tableData = [];
tableRows.each(function () {
var rowData = {
id: this.cells[0].innerHTML,
answer: $('#complianceQuestionnare_' + this.cells[0].innerHTML).val(),
};
tableData.push(rowData);
});
// console.log(tableData);
return (JSON.stringify(tableData, null, 4));
}
function PopUpWindow(url, param) {
var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if (param == undefined || param == "") {
param = "dialogHeight:500px;dialogWidth:600px;dialogLeft:300;dialogTop:100;center:yes";
}
if (isChrome) {
window.open(url, "_blank", param);
} else {
return window.showModalDialog(url, window.self, param);
}
//return window.showModalDialog(url, window.self, param); //changed instead of showModalDialog()
}

1
JMEAgentSystem/Site.Master

@ -14,6 +14,7 @@
<%: Styles.Render("~/bundles/allcss") %>
</asp:PlaceHolder>
<link href="~/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<style type="text/css">
.no-js #loader {
display: none;

27
JMEAgentSystem/Web.config

@ -11,8 +11,8 @@
<connectionStrings>
<!--<add name="dbConnection" connectionString="server=10.1.1.41;Database=FastMoneyPro_Remit;uid=fastmoney;pwd=fastmoney#999!;" providerName="System.Data.SqlClient" />
<add name="LOGDB" connectionString="server=10.1.1.41;Database=LogDb;uid=fastmoney;pwd=fastmoney#999!;" providerName="System.Data.SqlClient" />-->
<add name="dbConnection" connectionString="server=192.168.27.51;Database=FastMoneyPro_Remit;uid=Support;pwd=P@ssw0rd@321!;" providerName="System.Data.SqlClient" />
<add name="LOGDB" connectionString="server=192.168.27.51;Database=LogDb;uid=fastmoney;pwd=fastmoney#999!;" providerName="System.Data.SqlClient" />
<add name="dbConnection" connectionString="server=192.168.53.21;Database=FastMoneyPro_Remit;uid=jmeuser;pwd=P@ssw0rd@321!;" providerName="System.Data.SqlClient" />
<add name="LOGDB" connectionString="server=192.168.53.21;Database=LogDb;uid=jmeuser;pwd=P@ssw0rd@321!;" providerName="System.Data.SqlClient" />
<!--<add name="dbConnection" connectionString="server=34.92.161.102;Database=FastMoneyPro_Remit;uid=remituserjme;pwd=r3M!tU5Er@jM3r3Mit#?;" providerName="System.Data.SqlClient" />
<add name="LOGDB" connectionString="server=34.92.161.102;Database=LogDb;uid=remituserjme;pwd=r3M!tU5Er@jM3r3Mit#?;" providerName="System.Data.SqlClient" />-->
</connectionStrings>
@ -26,7 +26,7 @@
</compilation>
<authentication mode="None" />
<httpRuntime targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" requestValidationMode="2.0"/>
<pages>
<namespaces>
<add namespace="System.Web.Optimization" />
@ -82,7 +82,8 @@
<add key="customerDocFileExtension" value=".jpeg,.jpg" />
<add key="root" value="E:\C# Projects\UAT\JME_JAPAN\JME_Remit_Live\JMEAgentSystem\JMEAgentSystem\" />
<add key="urlRoot" value="http://localhost:63438" />
<add key="cto" value="100" />
<!-- API PartnerId-->
<add key="transfast" value="394130" />
<add key="jmeNepal" value="393880" />
@ -102,31 +103,35 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<!--<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
</dependentAssembly>-->
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />

2
JMEAgentSystem/WebPages/SendTxn/PrintSendMoneyRequestDetails.aspx.cs

@ -67,7 +67,7 @@ namespace JMEAgentSystem.WebPages.SendTxn
//set receiver dettails
SetTransactionDetails(dataSet.Tables[3].Rows[0]);
PrintDetails pd = new PrintDetails();
docDiv.InnerHtml = pd.GetSignatrueHtml(dataSet, "Staff Visit - Send Txn(Customer Signature)", rowId);
// docDiv.InnerHtml = pd.GetSignatrueHtml(dataSet, "Staff Visit - Send Txn(Customer Signature)", rowId);
}
private string GetMembershipId()

119
JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx

@ -1,5 +1,7 @@
<%@ Page Title="" EnableEventValidation="false" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SendTxnRequest.aspx.cs" Inherits="JMEAgentSystem.WebPages.SendTxn.SendTxnRequest" %>
<%--<%@ Register TagPrefix="cc1" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=20.1.0.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="page-wrapper">
<div class="report-tab" runat="server" id="sendTxn">
@ -7,7 +9,7 @@
<div class="tab-content">
<div role="tabpanel" class="tab-pane" id="List">
</div>
<div role="tabpanel" id="Manage">
<div role="tabpanel" id="Manage" class="infoDiv">
<div class="">
<div class="register-form">
<div id="addEditPanel" runat="server">
@ -22,11 +24,16 @@
<asp:TextBox ID="senderIdNumber" runat="server" placeholder="ID Number" MaxLength="14" CssClass="form-control required" />
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="col-md-1 col-sm-4">
<div class="form-group">
<button id="searchCustomer" type="button" class="btn btn-success waves-effect waves-light" style="margin-top: 26px;">Search</button>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<button id="btnClear" type="button" class="btn btn-danger waves-effect waves-light" onclick="ClearAllCustomerInfo();" style="margin-top: 26px;">Clear</button>
</div>
</div>
</div>
</div>
</div>
@ -202,14 +209,14 @@
</div>
</div>
</div>
<div class="row" >
<div class="col-md-4 col-sm-4" style="display:none">
<div class="row">
<div class="col-md-4 col-sm-4" style="display: none">
<div class="form-group">
<select id="pCurrDdl" runat="server" class="required form-control" onchange="CalculateTxn();"></select>
</div>
</div>
</div>
</div>
<asp:HiddenField ID="hddPayoutPartner" runat="server" />
<asp:HiddenField ID="hddPmode" runat="server" />
@ -247,7 +254,7 @@
</div>
</div>
</div>
<div class="row" id="signatureDiv" style="display: none;">
<%-- <div class="row" id="signatureDiv" style="display: none;">
<div class="col-md-6 form-group">
<label class="control-label">Customer Signature:</label>
<div id="signature-pad" class="signature-pad" style="height: 350px;">
@ -270,10 +277,11 @@
<asp:TextBox autocomplete="stopdoingthat" TextMode="Password" ID="customerPassword" runat="server" CssClass="form-control" MaxLength="20"></asp:TextBox>
</div>
</div>
</div>
</div>--%>
<div class="row" id="step2SendRemittanceSaveButton" style="display: none;">
<div class="col-md-4 form-group">
<asp:Button ID="Save" Text="Save" disabled="disabled" runat="server" CssClass="btn btn-primary" OnClientClick="return ValidateDetailsMain()" OnClick="Save_Click" />
<input type="button" name="calc" id="calc" value="Send Transaction" class="btn btn-primary" />
<%-- <asp:Button ID="Save" Text="Save" disabled="disabled" runat="server" CssClass="btn btn-primary" AutoPostBack="false" OnClientClick="return ValidateDetailsMain()" OnClick="Save_Click" />--%>
</div>
</div>
</div>
@ -281,15 +289,103 @@
</div>
</div>
</div>
<div class="panel panel-default" id="additionalCDDI" style="display: none;">
<div class="panel-heading">
<h4 class="panel-title">Additional Customer Due Diligence Information -(CDDI)</h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
</div>
</div>
<div class="panel-body">
<div class="col-md-12 form-group">
<div class="table-responsive">
<table class="table" id="tblComplianceQsn">
<tbody>
</tbody>
</table>
</div>
</div>
<div class="col-md-12 form-group" id="divHideForVisa1">
<p style="background-color: yellow; font-weight: 600; padding: 4px; float: left">Instruction:</p>
</div>
<div class="col-md-12 form-group" id="divHideForVisa">
<p>
<b>If Sender work at company, please mark No.4 and No.5 as N/A.<br />
If Sender do not work, please mark No.2, No.3 and No.4 as N/A.<br />
If Sender run your own business, please mark No.3 and No.5 as N/A.<br />
</b>
</p>
</div>
<div class="col-md-12 form-group">
<input type="button" id="btnSendTxnCDDI" class="btn btn-primary" value="Send Txn" />
</div>
</div>
</div>
<div class="col-sm-12">
<span id="spnWarningMsg" runat="server" style="font-family: Verdana; font-weight: bold; font-size: 24px; color: Red;"></span>
<div id="divOfac" runat="server"></div>
</div>
<div class="col-sm-12">
<fieldset id="complianceField" runat="server" visible="false" style="margin: 15px 0;">
<legend style="background-color: red;">Note: If are in compliance then you can not make the transaction !!!
</legend>
<div id="divCompliance" runat="server"></div>
</fieldset>
<div id="divComplianceMultipleTxn" runat="server" visible="false" style="width: 100%"></div>
</div>
<div class="col-sm-12" id="additionalDocumentDiv" runat="server" visible="false" style="display: none;">
<asp:CheckBox ID="additionDocumentConfirm" runat="server"
Style="font-family: Verdana; font-weight: bold; font-size: 24px; color: Red;"
Text="Additional document required for this transaction, do you want to proceed?" />
</div>
<div class="col-sm-12" style="display:none;">
<div class="form-group">
<asp:Button ID="btnProceed" runat="server" CssClass="btn btn-primary m-t-25" Text="Proceed" OnClick="btnProceed_Click" />
<%-- <cc1:confirmbuttonextender id="btnProceedCc" runat="server"
confirmtext="" enabled="True" targetcontrolid="btnProceed">
</cc1:confirmbuttonextender>--%>
<input type="button" value="Close" class="btn btn-clear m-t25" id="btnClose" onclick="CloseWindow();" />
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="modalAdditionalDocumentRequired" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" style="font-size: 18px; font-weight: 600;">Addition Document Required</h5>
<%--<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>--%>
</div>
<div class="modal-body">
Additional document required for this transaction, do you want to proceed?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="btnHaveDocumentNo">No</button>
<button type="button" class="btn btn-primary" id="btnHaveDocumentYes" data-dismiss="modal">Yes</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
</div>
<asp:HiddenField ID="hddImgURL" runat="server" />
<asp:HiddenField runat="server" ID="hdnCustomerId" />
<asp:HiddenField runat="server" ID="hddPagentName" />
<asp:HiddenField runat="server" ID="hddPBranchName" />
<asp:HiddenField ID="hddFetchExrateFromPartner" runat="server" />
<asp:HiddenField ID="hddPCountryCode" runat="server" />
<asp:HiddenField ID="hddReceiverId" runat="server" />
<asp:HiddenField ID="hdnTrackBy" runat="server" />
<asp:HiddenField ID="hdnOfacRes" runat="server" />
<asp:HiddenField ID="hdnOfacReason" runat="server" />
<asp:HiddenField ID="hddIsAdditionalCDDI" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Script" runat="server">
<style>
@ -306,7 +402,10 @@
<link href="/Content/css/signature-pad.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/css/select2.min.css" rel="stylesheet" />
<script src="/Scripts/SendTxnJs/SendMoneyRequest.js?v=1.0"></script>
<script src="/Scripts/functions.js"></script>
<script src="../../Scripts/SendTxnJs/cddiData.js"></script>
<script src="../../js/functions.js"></script>
<%-- <script src="../../Scripts/SendTxnJs/SendTxnInfo.js"></script>--%>
<%-- <script src="/Scripts/functions.js"></script>--%>
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/js/select2.min.js"></script>
<script src="/js/singnature/signature_pad.umd.js"></script>
<script src="/js/singnature/customerSignature.js"></script>

676
JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.cs

@ -2,6 +2,7 @@
using Business.Customer;
using Common.Helper;
using Common.Model.BankModel;
using Common.Utility;
using JMEAgentSystem.Library;
using Newtonsoft.Json;
using Repository.DAO;
@ -12,12 +13,16 @@ using Swift.API.Common;
using Swift.API.Common.ExRate;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.UI;
using System.Xml.Linq;
using System.Web.UI.WebControls;
using Newtonsoft.Json.Linq;
namespace JMEAgentSystem.WebPages.SendTxn
{
@ -63,6 +68,21 @@ namespace JMEAgentSystem.WebPages.SendTxn
case "PCurrPcountry":
PCurrPcountry();
break;
case "getAdditionalCDDI":
GetAdditionalCDDI();
break;
case "sendTransaction":
SendTransactionJS();
break;
case "ofacList":
GetOfacList();
break;
case "complainceList":
GetComplainceList();
break;
case "saveTransaction":
SaveTransaction();
break;
}
}
catch (Exception ex)
@ -73,6 +93,265 @@ namespace JMEAgentSystem.WebPages.SendTxn
}
}
private void SendTransactionJS()
{
string json = "";
// var randObj = new Random();
// var agentRefId = randObj.Next(1000000000, 1999999999).ToString();
var receiverId = ddlBenedeciary.SelectedValue;
var isExrateFromPartner = "N";
DataSet ds = new DataSet();
var idNumber = Request.Form["idNumber"];
var receiverFullNameValue = Request.Form["receiverFullNameValue"];
var receiveraddressValue = Request.Form["receiveraddressValue"];
var receiverMobileNumberValue = Request.Form["receiverMobileNumberValue"];
var pCountryId = Request.Form["pCountryId"];
var pmodeId = Request.Form["pmodeId"];
var pagentId = Request.Form["pagentId"];
var branchId = Request.Form["branchId"];
var accountnoValue = Request.Form["accountnoValue"];
var cAmt = Request.Form["cAmt"];
var tamt = Request.Form["tamt"];
var serviceCharge = Request.Form["serviceCharge"];
var purposeOfRemittanceId = Request.Form["purposeOfRemittanceId"];
var otherPurpose = Request.Form["otherPurpose"];
var relationShipId = Request.Form["relationShipId"];
var otherRelation = Request.Form["otherRelation"];
var referralNameValue = Request.Form["referralNameValue"];
var collectionMode = Request.Form["collectionMode"];
var deliveryMethod = Request.Form["deliveryMethod"];
var agentRefId = Request.Form["agentRefId"];
var isCDDI = Request.Form["isCDDI"];
var xmlDataForCDDI = Request.Form["xmlDataForCDDI"];
if (agentRefId == null)
{
var randObj = new Random();
agentRefId = randObj.Next(1000000000, 1999999999).ToString();
}
SendTransactionModel sendTxn = new SendTransactionModel()
{
IdNumber = idNumber,
ReceiverId = ddlBenedeciary.SelectedValue,
ReceiverFullName = receiverFullNameValue,
Receiveraddress = receiveraddressValue,
ReceiverMobileNumber = receiverMobileNumberValue,
PCountryId = pCountryId,
PmodeId = pmodeId,
PagentId = pagentId,
BranchId = branchId,
AccountNumber = accountnoValue,
CAmt = cAmt,
Tamt = tamt,
ServiceCharge = serviceCharge,
PurposeOfRemittance = purposeOfRemittanceId,
OtherPurposeOfRemittance = otherPurpose,
RelationShip = relationShipId,
OtherRelationShip = otherRelation,
ReferralName = referralNameValue,
BranchManual = branch_manual.Text,
bankName = hddPagentName.Value,
branchName = hddPBranchName.Value,
DeliveryMethod = deliveryMethod,
collMode = collectionMode,
AgentRefId = agentRefId,
IsCDDI = isCDDI,
CDDIXml = xmlDataForCDDI
};
if (isExrateFromPartner == "true")
{
//ds = st.ValidateTransactionTP(sendTxn);
}
else
{
ds = st.ValidateTransaction(sendTxn);
}
var dbResult = st.ParseDbResult(ds.Tables[0]);
if (string.IsNullOrEmpty(receiverId))
{
if (dbResult.ErrorCode == "0")
{
hddReceiverId.Value = dbResult.Extra;
}
else if (dbResult.ErrorCode == "100")
{
var dbResult1 = st.ParseDbResult(ds.Tables[2]);
if (dbResult1.ErrorCode == "0")
{
hddReceiverId.Value = dbResult1.Extra;
}
else
{
var dbResult2 = st.ParseDbResult(ds.Tables[4]);
hddReceiverId.Value = dbResult2.Extra;
}
}
else if (dbResult.ErrorCode == "101" || dbResult.ErrorCode == "102" || dbResult.ErrorCode == "103")
{
var dbResult1 = st.ParseDbResult(ds.Tables[2]);
hddReceiverId.Value = dbResult1.Extra;
}
}
if (dbResult.ErrorCode != "0")
{
Response.ContentType = "text/plain";
json = GetStatic.DataSetToJSON(ds);
Response.Write(json);
Response.End();
}
//else
//{
// var sendTxnResult = st.SaveSendRequest(GetStatic.GetUser(), sendTxn);
// if (sendTxnResult.ErrorCode == "0")
// {
// if (sendTxnResult.ErrorCode == "0" && !string.IsNullOrEmpty(hddImgURL.Value) && !string.IsNullOrWhiteSpace(hddImgURL.Value))
// {
// var res = _customerServices.GetCustomerDetailsForFileUpload(sendTxnResult.Extra.Split('|')[0]).Split('|');
// var customerId = res[0];
// var membershipId = res[1];
// var registerDate = res[2];
// string signatureName = GetStatic.UploadSignatureImage(hddImgURL.Value, registerDate, membershipId, customerId);
// if (signatureName != "1")
// {
// _customerServices.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName
// , "Staff Visit - Send Txn(Customer Signature)", sendTxnResult.Id);
// }
// }
// var url = ("PrintSendMoneyRequestDetails.aspx?customerId=" + sendTxnResult.Extra.Split('|')[1] + "&rowId=" + sendTxnResult.Id);
// Response.Redirect(url);
// }
// else
// {
// pCountry.SelectedValue = "";
// GetStatic.AlertMessage(this.Page, sendTxnResult.Msg);
// }
//}
Response.ContentType = "text/plain";
json = GetStatic.DataSetToJSON(ds);
Response.Write(json);
Response.End();
}
private void SaveTransaction()
{
string json = "";
// var randObj = new Random();
// var agentRefId = randObj.Next(1000000000, 1999999999).ToString();
var receiverId = ddlBenedeciary.SelectedValue;
var isExrateFromPartner = "N";
DataSet ds = new DataSet();
var idNumber = Request.Form["idNumber"];
var receiverFullNameValue = Request.Form["receiverFullNameValue"];
var receiveraddressValue = Request.Form["receiveraddressValue"];
var receiverMobileNumberValue = Request.Form["receiverMobileNumberValue"];
var pCountryId = Request.Form["pCountryId"];
var pmodeId = Request.Form["pmodeId"];
var pagentId = Request.Form["pagentId"];
var branchId = Request.Form["branchId"];
var accountnoValue = Request.Form["accountnoValue"];
var cAmt = Request.Form["cAmt"];
var tamt = Request.Form["tamt"];
var serviceCharge = Request.Form["serviceCharge"];
var purposeOfRemittanceId = Request.Form["purposeOfRemittanceId"];
var otherPurpose = Request.Form["otherPurpose"];
var relationShipId = Request.Form["relationShipId"];
var otherRelation = Request.Form["otherRelation"];
var referralNameValue = Request.Form["referralNameValue"];
var collectionMode = Request.Form["collectionMode"];
var deliveryMethod = Request.Form["deliveryMethod"];
var agentRefId = Request.Form["agentRefId"];
var isCDDI = Request.Form["isCDDI"];
var xmlDataForCDDI = Request.Form["xmlDataForCDDI"];
string xmlDataForCDDI2 = ConvertJsonToXml(xmlDataForCDDI);
if (agentRefId == null)
{
var randObj = new Random();
agentRefId = randObj.Next(1000000000, 1999999999).ToString();
}
SendTransactionModel sendTxn = new SendTransactionModel()
{
IdNumber = idNumber,
ReceiverId = ddlBenedeciary.SelectedValue,
ReceiverFullName = receiverFullNameValue,
Receiveraddress = receiveraddressValue,
ReceiverMobileNumber = receiverMobileNumberValue,
PCountryId = pCountryId,
PmodeId = pmodeId,
PagentId = pagentId,
BranchId = branchId,
AccountNumber = accountnoValue,
CAmt = cAmt,
Tamt = tamt,
ServiceCharge = serviceCharge,
PurposeOfRemittance = purposeOfRemittanceId,
OtherPurposeOfRemittance = otherPurpose,
RelationShip = relationShipId,
OtherRelationShip = otherRelation,
ReferralName = referralNameValue,
BranchManual = branch_manual.Text,
bankName = hddPagentName.Value,
branchName = hddPBranchName.Value,
DeliveryMethod = deliveryMethod,
collMode = collectionMode,
AgentRefId = agentRefId,
IsCDDI = isCDDI,
CDDIXml = xmlDataForCDDI2
};
var sendTxnResult = st.SaveSendRequest(GetStatic.GetUser(), sendTxn);
if (sendTxnResult.ErrorCode == "0")
{
//if (sendTxnResult.ErrorCode == "0" && !string.IsNullOrEmpty(hddImgURL.Value) && !string.IsNullOrWhiteSpace(hddImgURL.Value))
//{
// var res = _customerServices.GetCustomerDetailsForFileUpload(sendTxnResult.Extra.Split('|')[0]).Split('|');
// var customerId = res[0];
// var membershipId = res[1];
// var registerDate = res[2];
// string signatureName = GetStatic.UploadSignatureImage(hddImgURL.Value, registerDate, membershipId, customerId);
// if (signatureName != "1")
// {
// _customerServices.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName
// , "Staff Visit - Send Txn(Customer Signature)", sendTxnResult.Id);
// }
//}
GetStatic.AlertMessage(this.Page, sendTxnResult.Msg);
//var url = ("PrintSendMoneyRequestDetails.aspx?customerId=" + sendTxnResult.Extra.Split('|')[1] + "&rowId=" + sendTxnResult.Id);
//Response.Redirect(url);
json = JsonConvert.SerializeObject(sendTxnResult);
Response.Write(json);
Response.End();
}
else
{
pCountry.SelectedValue = "";
GetStatic.AlertMessage(this.Page, sendTxnResult.Msg);
}
Response.ContentType = "text/plain";
json = JsonConvert.SerializeObject(sendTxnResult);
// json = GetStatic.DataTableToJson(sendTxnResult);
Response.Write(json);
Response.End();
}
private void GetBenefeciaryDetails()
{
string benefeciaryId = Request.Form["BenefeciaryId"];
@ -170,26 +449,7 @@ namespace JMEAgentSystem.WebPages.SendTxn
Response.Write(json);
Response.End();
}
public static string DataTableToJson(DataTable table)
{
if (table == null)
return "";
var list = new List<Dictionary<string, object>>();
foreach (DataRow row in table.Rows)
{
var dict = new Dictionary<string, object>();
foreach (DataColumn col in table.Columns)
{
dict[col.ColumnName] = string.IsNullOrEmpty(row[col].ToString()) ? "" : row[col];
}
list.Add(dict);
}
var serializer = new JavaScriptSerializer();
string json = serializer.Serialize(list);
return json;
}
public string GetAPIPartnerId()
{
string partnerIds = GetStatic.ReadWebConfig("transfast", "") + "," + GetStatic.ReadWebConfig("jmeNepal", "") + "," + GetStatic.ReadWebConfig("donga", "");
@ -320,90 +580,340 @@ namespace JMEAgentSystem.WebPages.SendTxn
Response.End();
}
protected void Save_Click(object sender, EventArgs e)
private void PCurrPcountry()
{
var idNumber = senderIdNumber.Text;
var receiverFullNameValue = receiverFullName.Text;
var receiveraddressValue = receiveraddress.Text;
var receiverMobileNumberValue = receiverMobileNumber.Text;
var pCountryId = pCountry.SelectedValue;
var pmodeId = hddPmode.Value;
var pagentId = hddPagent.Value;
var branchId = hddpBranch.Value;
var accountnoValue = accountNo.Text;
var cAmt = txtCollAmt.Text;
var tamt = hddTamt.Value;
var serviceCharge = hddServiceCharge.Value;
var purposeOfRemittanceId = purpose.SelectedValue;
var otherPurpose = purposeOther.Text;
var relationShipId = relationship.SelectedValue;
var otherRelation = otherRelationshipTextBox.Text;
var referralNameValue = referralName.Text;
var collectionMode = ddlCollMode.SelectedValue;
string pCountry = Request.Form["pCountry"];
string pMode = Request.Form["pMode"];
string pAgent = Request.Form["pAgent"];
SendTransactionModel sendTxn = new SendTransactionModel()
{
IdNumber = idNumber,
ReceiverFullName = receiverFullNameValue,
Receiveraddress = receiveraddressValue,
ReceiverMobileNumber = receiverMobileNumberValue,
PCountryId = pCountryId,
PmodeId = pmodeId,
PagentId = pagentId,
BranchId = branchId,
AccountNumber = accountnoValue,
CAmt = cAmt,
Tamt = tamt,
ServiceCharge = serviceCharge,
PurposeOfRemittance = purposeOfRemittanceId,
OtherPurposeOfRemittance = otherPurpose,
RelationShip = relationShipId,
OtherRelationShip = otherRelation,
ReferralName = referralNameValue,
BranchManual = branch_manual.Text,
bankName = hddPagentName.Value,
branchName = hddPBranchName.Value,
collMode = collectionMode
};
DataTable Dt = st.LoadPayCurr(pCountry, pMode, pAgent);
Response.ContentType = "text/plain";
string json = DataTableToJson(Dt);
Response.Write(json);
Response.End();
}
protected void btnProceed_Click(object sender, EventArgs e)
{
//Proceed();
}
var result = st.SaveSendRequest(GetStatic.GetUser(), sendTxn);
if (result.ErrorCode == "0")
#region Questionnaire
private void GetOfacList()
{
var dbResult = Request.Form["dbResult"];
var ofacTable = Request.Form["ofacTable"];
var receiverFullName = Request.Form["receiverFullName"];
List<DbResult1> DbResult1 = JsonConvert.DeserializeObject<List<DbResult1>>(dbResult);
var dbResult1 = DbResult1.ToDataTable();
List<OfacTable> OfacTableList = JsonConvert.DeserializeObject<List<OfacTable>>(ofacTable);
var dt = OfacTableList.ToDataTable();
var confirmText = "Confirmation:\n_____________________________________";
confirmText += "\n\nYou are confirming to send this OFAC/DJ suspicious transaction!!!";
confirmText += "\n\nPlease note if this customer is found to be valid person from OFAC/DJ List then Teller will be charged fine from management";
confirmText += "\n\n\nPlease make sure you have proper evidence that show this customer is not from OFAC/DJ List";
// btnProceedCc.ConfirmText = confirmText;
int cols = dt.Columns.Count;
var db = st.ParseDbResult(dbResult1);
spnWarningMsg.InnerHtml = db.Msg;
var str = new StringBuilder("<div class='table-responsive'><table class='TBLData table table-striped table-bordered' border=\"1\" cellspacing=0 cellpadding=\"3\">");
str.Append("<tr>");
for (int i = 0; i < cols; i++)
{
if (result.ErrorCode == "0" && !string.IsNullOrEmpty(hddImgURL.Value) && !string.IsNullOrWhiteSpace(hddImgURL.Value))
str.Append("<th><div align=\"left\">" + dt.Columns[i].ColumnName + "</div></th>");
}
str.Append("</tr>");
foreach (DataRow dr in dt.Rows)
{
str.Append("<tr>");
str.Append("<td align=\"left\">" + dr[0] + "</td>");
string[] strArr;
if (receiverFullName.Split(' ').Length > 2)
{
var res = _customerServices.GetCustomerDetailsForFileUpload(result.Extra.Split('|')[0]).Split('|');
var customerId = res[0];
var membershipId = res[1];
var registerDate = res[2];
strArr = new string[] { receiverFullName.Split(' ')[0].ToUpper(), receiverFullName.Split(' ')[1].ToUpper(), receiverFullName.Split(' ')[2].ToUpper() };
}
else
{
strArr = new string[] { receiverFullName.Split(' ')[0].ToUpper(), receiverFullName.Split(' ')[1].ToUpper() };
}
string signatureName = GetStatic.UploadSignatureImage(hddImgURL.Value, registerDate, membershipId, customerId);
if (signatureName != "1")
//string[] strArr = {
// receiverFullName.Text.Split(' ')[0].ToUpper() , receiverFullName.Text.Split(' ')[1].ToUpper() , receiverFullName.Text.Split(' ')[2].ToUpper()
// };
var arrlen = strArr.Length;
string value = dr[1].ToString();
for (int j = 0; j < arrlen; j++)
{
if (!string.IsNullOrWhiteSpace(strArr[j]))
{
_customerServices.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName
, "Staff Visit - Send Txn(Customer Signature)", result.Id);
//if (j == 0 && !string.IsNullOrWhiteSpace(strArr[j]))
if (strArr[j].Length > 2)
{
value = value.ToUpper().Replace(strArr[j],
GetStatic.PutRedBackGround(strArr[j]));
}
}
}
var url = ("PrintSendMoneyRequestDetails.aspx?customerId=" + result.Extra.Split('|')[1] + "&rowId=" + result.Id);
Response.Redirect(url);
str.Append("<td align=\"left\">" + value + "</td>");
str.Append("</tr>");
}
str.Append("<tr>");
str.Append("<td colspan=\"2\">OFAC Listed Customer are BLACK Listed customer or Suspicious for terrorist or Money Loundery Customer" +
", please ask for valid documentation from customer</td>");
str.Append("</tr>");
str.Append("</table></div>");
divOfac.InnerHtml = str.ToString();
}
private void GetComplainceList()
{
var json = "";
DataTable dt = new DataTable();
List<ComplianceTable> ComplainceTableList = new List<ComplianceTable>();
List<OfacTable> OfacTableList = new List<OfacTable>();
var dbResult = Request.Form["dbResult"];
var complianceTable = Request.Form["complianceTable"];
var complianceType = Request.Form["complianceType"];
var randObj = new Random();
var agentRefId = randObj.Next(1000000000, 1999999999).ToString();
List<DbResult2> DbResult2 = JsonConvert.DeserializeObject<List<DbResult2>>(dbResult);
var dbResult2 = DbResult2.ToDataTable();
if (complianceType == "tran")
{
ComplainceTableList = JsonConvert.DeserializeObject<List<ComplianceTable>>(complianceTable);
dt = ComplainceTableList.ToDataTable();
}
else
{
pCountry.SelectedValue = "";
GetStatic.AlertMessage(this.Page, result.Msg);
OfacTableList = JsonConvert.DeserializeObject<List<OfacTable>>(complianceTable);
dt = OfacTableList.ToDataTable();
}
var db = st.ParseDbResult(dbResult2);
string _isCDDI = hddIsAdditionalCDDI.Value;
string isVisastatusRequireQuestionnaire = db.Id.ToUpper();
if (db.ErrorCode == "101")
{
btnProceed.Enabled = false;
btnProceed.Visible = false;
LoadComplianceListNew(db, dt);
}
if (db.ErrorCode == "102")
{
btnProceed.Enabled = true;
btnProceed.Visible = true;
if (db.Extra2 == "Y")
{
additionalDocumentDiv.Visible = true;
}
if (_isCDDI == "Y" || (_isCDDI == "N" && isVisastatusRequireQuestionnaire == "N"))
{
LoadComplianceListNew(db, dt);
}
if (isVisastatusRequireQuestionnaire == "Y")
{
var msgCompliance = GetStatic.ParseResultJsPrint(db);
//// GetStatic.CallBackJs1(Page, "Print Message", "ManageMessage('" + msgCompliance + "-:::-" + dbResult.Extra2 + "-:::-" + agentRefId + "-:::-" + dbResult.Id + "');");
//ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "ManageMessage('" + msgCompliance + "-:::-" + db.Extra2 + "-:::-" + agentRefId + "-:::-" + db.Id + "');", true);
Response.ContentType = "text/plain";
db.ErrorCode = db.ErrorCode + "|" + agentRefId;
json = JsonConvert.SerializeObject(db);
Response.Write(json);
Response.End();
}
}
if (db.ErrorCode == "103")
{
btnProceed.Enabled = true;
btnProceed.Visible = true;
if (_isCDDI == "Y")
{
LoadComplianceListNew(db, dt);
}
else
{
var msgCompliance = GetStatic.ParseResultJsPrint(db);
GetStatic.CallBackJs1(Page, "Print Message", "ManageMessage('" + msgCompliance + "-:::-" + db.Extra2 + "-:::-" + agentRefId + "-:::-" + db.Id + "');");
}
}
var mes = GetStatic.ParseResultJsPrint(db);
// GetStatic.CallBackJs1(Page, "Print Message", "ManageMessage('" + mes + "');");
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "ManageMessage('" + mes + "');", true);
}
private void PCurrPcountry()
private void LoadComplianceListNew(DbResult dbResult, DataTable dt)
{
string pCountry = Request.Form["pCountry"];
string pMode = Request.Form["pMode"];
string pAgent = Request.Form["pAgent"];
int cols = dt.Columns.Count;
var str =
new StringBuilder("<div class='table-responsive'><table class='table table-responsive table-striped table-bordered'>");
str.Append("<tr>");
for (int i = 2; i < cols; i++)
{
str.Append("<th><div align=\"left\">" + dt.Columns[i].ColumnName + "</div></th>");
}
str.Append("</tr>");
foreach (DataRow dr in dt.Rows)
{
str.Append("<tr>");
str.Append("<td>" + dr["S.N."].ToString() + "</td>");
str.Append("<td align=\"left\"><a href=\"#\" onclick=\"OpenInNewWindow('/Remit/OFACManagement/ComplianceDetail.aspx?id=" +
dr["Id"].ToString() + "&type=compNew')\">" + dr["Remarks"].ToString() + "</a></td>");
str.Append("<td align='center' class='bg-danger'></strong>" + dr["Action"].ToString() + "</strong></td>");
str.Append("</tr>");
}
str.Append("</table></div>");
divCompliance.InnerHtml = str.ToString();
}
DataTable Dt = st.LoadPayCurr(pCountry, pMode, pAgent);
protected void GetAdditionalCDDI()
{
string customerId = Request.Form["customerId"];
string isOnlyVisaStatusQuestionnaire = Request.Form["IsOnlyVisaStatusQuestionnaire"];
//var dt = st.LoadCustomerData(searchType, searchValue, "s", GetStatic.GetCountryId(), GetStatic.GetSettlingAgent());
var dt = st.GetAdditionalCDDIInfo(GetStatic.GetUser(), customerId, isOnlyVisaStatusQuestionnaire);
if (dt == null)
{
Response.Write("");
Response.End();
return;
}
Response.ContentType = "text/plain";
string json = DataTableToJson(Dt);
string json = GetStatic.DataTableToJson(dt);
Response.Write(json);
Response.End();
}
#endregion Questionnaire
#region Models
public class DbResult1
{
public int ErrorCode { get; set; }
public string Msg { get; set; }
public string Id { get; set; }
public string CompApproveRemark { get; set; }
public string VType { get; set; }
public string IsDocumentRequired { get; set; }
}
public class DbResult2
{
public int ErrorCode { get; set; }
public string Msg { get; set; }
public string Id { get; set; }
public string Extra { get; set; }
}
public class OfacTable
{
public int Id { get; set; }
public string CsDetailRecId { get; set; }
public string SN { get; set; }
public string Remarks { get; set; }
public string Action { get; set; }
}
public class ComplianceTable
{
public int ControlNo { get; set; }
public string TranId { get; set; }
public string SenderName { get; set; }
public string SIdType { get; set; }
public string SIdNo { get; set; }
public string CAmt { get; set; }
public string Pcountry { get; set; }
}
#endregion Models
#region Helper
public static string DataTableToJson(DataTable table)
{
if (table == null)
return "";
var list = new List<Dictionary<string, object>>();
foreach (DataRow row in table.Rows)
{
var dict = new Dictionary<string, object>();
foreach (DataColumn col in table.Columns)
{
dict[col.ColumnName] = string.IsNullOrEmpty(row[col].ToString()) ? "" : row[col];
}
list.Add(dict);
}
var serializer = new JavaScriptSerializer();
string json = serializer.Serialize(list);
return json;
}
public string ConvertJsonToXml(string jsonString)
{
dynamic jsonObject = JsonConvert.DeserializeObject(jsonString);
XDocument xmlDocument = new XDocument();
XElement rootElement = new XElement("root");
if (jsonObject is JArray)
{
foreach (var item in jsonObject)
{
XElement itemElement = new XElement("row");
AddJsonToXmlElement(item, itemElement);
rootElement.Add(itemElement);
}
}
else if (jsonObject is JObject)
{
AddJsonToXmlElement(jsonObject, rootElement);
}
xmlDocument.Add(rootElement);
return xmlDocument.ToString();
}
private void AddJsonToXmlElement(dynamic jsonObject, XElement xmlElement)
{
foreach (var property in jsonObject)
{
if (property.Value is JArray)
{
foreach (var row in property.Value)
{
XElement newElement = new XElement(property.Name.ToString());
xmlElement.Add(newElement);
AddJsonToXmlElement(row, newElement);
}
}
else if (property.Value is JObject)
{
XElement newElement = new XElement(property.Name.ToString());
xmlElement.Add(newElement);
AddJsonToXmlElement(property.Value, newElement);
}
else
{
xmlElement.Add(new XAttribute(property.Name.ToString(), property.Value.ToString()));
}
}
}
#endregion Helper
}
}

222
JMEAgentSystem/WebPages/SendTxn/SendTxnRequest.aspx.designer.cs

@ -7,11 +7,13 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace JMEAgentSystem.WebPages.SendTxn {
public partial class SendTxnRequest {
namespace JMEAgentSystem.WebPages.SendTxn
{
public partial class SendTxnRequest
{
/// <summary>
/// sendTxn control.
/// </summary>
@ -20,7 +22,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl sendTxn;
/// <summary>
/// addEditPanel control.
/// </summary>
@ -29,7 +31,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl addEditPanel;
/// <summary>
/// senderIdNumber control.
/// </summary>
@ -38,7 +40,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox senderIdNumber;
/// <summary>
/// customerName control.
/// </summary>
@ -47,7 +49,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl customerName;
/// <summary>
/// membershiId control.
/// </summary>
@ -56,7 +58,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl membershiId;
/// <summary>
/// ddlCollMode control.
/// </summary>
@ -65,7 +67,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlCollMode;
/// <summary>
/// ddlBenedeciary control.
/// </summary>
@ -74,7 +76,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlBenedeciary;
/// <summary>
/// receiverFullName control.
/// </summary>
@ -83,7 +85,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox receiverFullName;
/// <summary>
/// receiveraddress control.
/// </summary>
@ -92,7 +94,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox receiveraddress;
/// <summary>
/// receiverMobileNumber control.
/// </summary>
@ -101,7 +103,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox receiverMobileNumber;
/// <summary>
/// pCountry control.
/// </summary>
@ -110,7 +112,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pCountry;
/// <summary>
/// pMode control.
/// </summary>
@ -119,7 +121,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pMode;
/// <summary>
/// pAgent control.
/// </summary>
@ -128,7 +130,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pAgent;
/// <summary>
/// pAgentDetail control.
/// </summary>
@ -137,7 +139,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pAgentDetail;
/// <summary>
/// pAgentMaxPayoutLimit control.
/// </summary>
@ -146,7 +148,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pAgentMaxPayoutLimit;
/// <summary>
/// branch control.
/// </summary>
@ -155,7 +157,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList branch;
/// <summary>
/// branch_manual control.
/// </summary>
@ -164,7 +166,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox branch_manual;
/// <summary>
/// accountNo control.
/// </summary>
@ -173,7 +175,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox accountNo;
/// <summary>
/// txtCollAmt control.
/// </summary>
@ -182,7 +184,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtCollAmt;
/// <summary>
/// lblPerTxnLimit control.
/// </summary>
@ -191,7 +193,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPerTxnLimit;
/// <summary>
/// lblPerTxnLimitCurr control.
/// </summary>
@ -200,7 +202,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPerTxnLimitCurr;
/// <summary>
/// lblSendAmt control.
/// </summary>
@ -209,7 +211,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox lblSendAmt;
/// <summary>
/// lblSendCurr control.
/// </summary>
@ -218,7 +220,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSendCurr;
/// <summary>
/// lblServiceChargeAmt control.
/// </summary>
@ -227,7 +229,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox lblServiceChargeAmt;
/// <summary>
/// lblServiceChargeCurr control.
/// </summary>
@ -236,7 +238,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblServiceChargeCurr;
/// <summary>
/// purpose control.
/// </summary>
@ -245,7 +247,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList purpose;
/// <summary>
/// purposeOther control.
/// </summary>
@ -254,7 +256,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox purposeOther;
/// <summary>
/// relationship control.
/// </summary>
@ -263,7 +265,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList relationship;
/// <summary>
/// otherRelationshipTextBox control.
/// </summary>
@ -272,7 +274,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox otherRelationshipTextBox;
/// <summary>
/// referralName control.
/// </summary>
@ -281,7 +283,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox referralName;
/// <summary>
/// pCurrDdl control.
/// </summary>
@ -290,7 +292,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlSelect pCurrDdl;
/// <summary>
/// hddPayoutPartner control.
/// </summary>
@ -299,7 +301,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPayoutPartner;
/// <summary>
/// hddPmode control.
/// </summary>
@ -308,7 +310,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPmode;
/// <summary>
/// hddPagent control.
/// </summary>
@ -317,7 +319,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPagent;
/// <summary>
/// hddpBranch control.
/// </summary>
@ -326,7 +328,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddpBranch;
/// <summary>
/// hddErrMsg control.
/// </summary>
@ -335,7 +337,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddErrMsg;
/// <summary>
/// hddTamt control.
/// </summary>
@ -344,7 +346,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddTamt;
/// <summary>
/// hddServiceCharge control.
/// </summary>
@ -353,7 +355,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddServiceCharge;
/// <summary>
/// allowEditSC control.
/// </summary>
@ -362,7 +364,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField allowEditSC;
/// <summary>
/// TransactionAgreementDiv control.
/// </summary>
@ -371,7 +373,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl TransactionAgreementDiv;
/// <summary>
/// TransactionAgreement control.
/// </summary>
@ -380,25 +382,79 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputCheckBox TransactionAgreement;
/// <summary>
/// spnWarningMsg control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spnWarningMsg;
/// <summary>
/// divOfac control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divOfac;
/// <summary>
/// complianceField control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl complianceField;
/// <summary>
/// divCompliance control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCompliance;
/// <summary>
/// divComplianceMultipleTxn control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divComplianceMultipleTxn;
/// <summary>
/// additionalDocumentDiv control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl additionalDocumentDiv;
/// <summary>
/// customerPassword control.
/// additionDocumentConfirm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox customerPassword;
protected global::System.Web.UI.WebControls.CheckBox additionDocumentConfirm;
/// <summary>
/// Save control.
/// btnProceed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button Save;
protected global::System.Web.UI.WebControls.Button btnProceed;
/// <summary>
/// hddImgURL control.
/// </summary>
@ -407,7 +463,16 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddImgURL;
/// <summary>
/// hdnCustomerId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnCustomerId;
/// <summary>
/// hddPagentName control.
/// </summary>
@ -416,7 +481,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPagentName;
/// <summary>
/// hddPBranchName control.
/// </summary>
@ -425,7 +490,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPBranchName;
/// <summary>
/// hddFetchExrateFromPartner control.
/// </summary>
@ -434,7 +499,7 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddFetchExrateFromPartner;
/// <summary>
/// hddPCountryCode control.
/// </summary>
@ -443,5 +508,50 @@ namespace JMEAgentSystem.WebPages.SendTxn {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddPCountryCode;
/// <summary>
/// hddReceiverId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddReceiverId;
/// <summary>
/// hdnTrackBy control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnTrackBy;
/// <summary>
/// hdnOfacRes control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnOfacRes;
/// <summary>
/// hdnOfacReason control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnOfacReason;
/// <summary>
/// hddIsAdditionalCDDI control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hddIsAdditionalCDDI;
}
}

60
Repository/DAO/SendTxnIRHDao/SendTxnIRHDao.cs

@ -177,9 +177,9 @@ namespace Repository.DAO.SendTxnIRHDao
sql += ", @receiveraddress = " + FilterString(sendTxn.Receiveraddress);
sql += ", @receiverMobileNumber = " + FilterString(sendTxn.ReceiverMobileNumber);
sql += ", @pCountryId = " + FilterString(sendTxn.PCountryId);
sql += ", @pModeId = " + FilterString(sendTxn.PmodeId);
sql += ", @pagentId = " + FilterString(sendTxn.PagentId);
sql += ", @branchId = " + FilterString(sendTxn.BranchId);
sql += ", @deliveryMethodId = " + FilterString(sendTxn.PmodeId);
sql += ", @pBankId = " + FilterString(sendTxn.PagentId);
sql += ", @pBankBranchId = " + FilterString(sendTxn.BranchId);
sql += ", @accountNumber = " + FilterString(sendTxn.AccountNumber);
sql += ", @cAmt = " + FilterString(sendTxn.CAmt);
sql += ", @tamt = " + FilterString(sendTxn.Tamt);
@ -190,10 +190,11 @@ namespace Repository.DAO.SendTxnIRHDao
sql += ", @otherRelation = " + FilterString(sendTxn.OtherRelationShip);
sql += ", @referralName = " + FilterString(sendTxn.ReferralName);
sql += ", @branchManual = " + FilterString(sendTxn.BranchManual);
sql += ", @bankName = " + FilterString(sendTxn.bankName);
sql += ", @branchName = " + FilterString(sendTxn.branchName);
sql += ", @pBankName = " + FilterString(sendTxn.bankName);
sql += ", @pBankBranchName = " + FilterString(sendTxn.branchName);
sql += ", @collMode = " + FilterString(sendTxn.collMode);
sql += ", @isAdditionalCDDI = " + FilterString(sendTxn.IsCDDI);
sql += ", @additionalCDDIXml = " + FilterString(sendTxn.CDDIXml);
DbResult dr = ParseDbResult(sql);
return dr;
@ -252,5 +253,52 @@ namespace Repository.DAO.SendTxnIRHDao
return ds.Tables[0];
}
public DataSet ValidateTransaction(SendTransactionModel trn)
{
var sql = "EXEC proc_sendRequest @flag = 'validate-cddi'";
//sql += ", @user = " + FilterString(user);
sql += ", @agentRefId = " + FilterString(trn.AgentRefId);
sql += ", @idNumber = " + FilterString(trn.IdNumber);
sql += ", @receiverFullName = " + FilterString(trn.ReceiverFullName);
sql += ", @receiveraddress = " + FilterString(trn.Receiveraddress);
sql += ", @receiverMobileNumber = " + FilterString(trn.ReceiverMobileNumber);
sql += ", @pCountryId = " + FilterString(trn.PCountryId);
sql += ", @deliveryMethodId = " + FilterString(trn.PmodeId);
sql += ", @pBankId = " + FilterString(trn.PagentId);
sql += ", @pBankBranchId = " + FilterString(trn.BranchId);
sql += ", @accountNumber = " + FilterString(trn.AccountNumber);
sql += ", @cAmt = " + FilterString(trn.CAmt);
sql += ", @tamt = " + FilterString(trn.Tamt);
sql += ", @serviceCharge = " + FilterString(trn.ServiceCharge);
sql += ", @purposeOfRemittanceId = " + FilterString(trn.PurposeOfRemittance);
sql += ", @otherPurposeOfRemittance = " + FilterString(trn.OtherPurposeOfRemittance);
sql += ", @relationShipId = " + FilterString(trn.RelationShip);
sql += ", @otherRelation = " + FilterString(trn.OtherRelationShip);
sql += ", @referralName = " + FilterString(trn.ReferralName);
sql += ", @branchManual = " + FilterString(trn.BranchManual);
sql += ", @pBankName = " + FilterString(trn.bankName);
sql += ", @pBankBranchName = " + FilterString(trn.branchName);
sql += ", @collMode = " + FilterString(trn.collMode);
//sql += ", @deliveryMethod = " + FilterString(trn.DeliveryMethod);
sql += ", @receiverId = " + FilterString(trn.ReceiverId);
//sql += ", @isAdditionalCDDI = " + FilterString(trn.isAdditionalCDDI);
var ds = ExecuteDataset(sql);
if (ds == null || ds.Tables.Count == 0)
return null;
return ds;
}
public DataTable GetAdditionalCDDIInfo(string user, string customerId, string isOnlyVisaStatusQuestionnaire)
{
string sql = "EXEC proc_sendPageLoadData @flag='additional-cddi'";
sql += " , @user = " + FilterString(user);
sql += " , @sCustomerId = " + FilterString(customerId);
sql += " , @isOnlyVisaStatusQuestionnaire = " + FilterString(isOnlyVisaStatusQuestionnaire);
return ExecuteDataTable(sql);
}
}
}

5
Repository/Model/SendTransactionModel.cs

@ -9,6 +9,7 @@ namespace Repository.Model
public class SendTransactionModel
{
public string MembershipId { get; set; }
public string ReceiverId { get; set; }
public string ReceiverFullName { get; set; }
public string Receiveraddress { get; set; }
public string ReceiverMobileNumber { get; set; }
@ -31,5 +32,9 @@ namespace Repository.Model
public string bankName { get; set; }
public string branchName { get; set; }
public string collMode { get; set; }
public string AgentRefId { get; set; }
public string DeliveryMethod { get; set; }
public string IsCDDI { get; set; }
public string CDDIXml { get; set; }
}
}

7
Repository/Repository.csproj

@ -31,8 +31,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
@ -45,6 +45,9 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WebGrease">
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="DAO\Account\AccountRepo.cs" />

Loading…
Cancel
Save