Browse Source

# First Txn All Compliance Hold

Prod
shakun 1 year ago
parent
commit
cdb014aebf
  1. 1
      Swift.web/Remit/Compliance/ApproveOFACandComplaince/List.aspx.cs
  2. 2
      Swift.web/Remit/Transaction/ApproveTxn/holdTxnList.aspx.cs
  3. 403
      Swift.web/Remit/UserControl/UcTransaction.ascx
  4. 307
      Swift.web/Remit/UserControl/UcTransaction.ascx.cs
  5. 154
      Swift.web/Remit/UserControl/UcTransaction.ascx.designer.cs

1
Swift.web/Remit/Compliance/ApproveOFACandComplaince/List.aspx.cs

@ -47,6 +47,7 @@ namespace Swift.web.Remit.Compliance.ApproveOFACandComplaince
new GridColumn("senderName", "Sender Name", "", "T"),
new GridColumn("receiverName", "Receiver Name", "", "T"),
new GridColumn("createdBy", " Email", "", "T"),
new GridColumn("complianceRemarks", " Remarks", "", "T"),
};
bool allowAddEdit = swiftLibrary.HasRight(AddEditFunctionId);

2
Swift.web/Remit/Transaction/ApproveTxn/holdTxnList.aspx.cs

@ -75,7 +75,7 @@ namespace Swift.web.Remit.Transaction.ApproveTxn
if (country.SelectedItem.Text == "" || country.SelectedItem.Text == "Select")
{
country.SelectedItem.Text = "JAPAN";
country.SelectedItem.Text = "UNITED KINGDOM";
}
var ds = at.GetHoldedTXNListAdmin(GetStatic.GetUser(), branch.Text, tranNo.Text, rCountry.Text, sender.Text, receiver.Text
, amt.Text, GetStatic.GetBranch(), GetStatic.GetUserType()

403
Swift.web/Remit/UserControl/UcTransaction.ascx

@ -41,19 +41,40 @@
</style>
<script type="text/javascript">
$(document).ready(function () {
$('#ucTran_reg_front_id').on('change', function (e) {
$('.loadImg').remove();
ValidateExtensionPdfonly('ucTran_reg_front_id');
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
debugger;
LoadcustomerData();
$("#uploadFrontIdDiv").hide();
$("#uploadBackIdDiv").hide();
$("#uploadAdditionalIdDiv").hide();
$("#uploadAdditionalIdDiv2").hide();
$("#editFrontId").click(function () {
$("#uploadFrontIdDiv").show();
});
$("#editBackId").click(function () {
$("#uploadBackIdDiv").show();
});
$("#editAdditionalId").click(function () {
$("#uploadAdditionalIdDiv").show();
});
$("#editAdditionalId2").click(function () {
$("#uploadAdditionalIdDiv2").show();
})
});
function LoadcustomerData() {
var eid = $('#<%=hdnCustomerId.ClientID%>').val();
dataToSend = { MethodName: 'GetCustomerDetails', Id: eid };
$.post('', dataToSend, function (response) {
PopulateImage();
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
function ValidateExtensionPdfonly(id) {
debugger;
var allowedFiles = [".pdf"];
var fileUpload = document.getElementById(id);
var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + allowedFiles.join('|') + ")$");
@ -110,6 +131,132 @@
cellsInRow[j].contentEditable = "true";
}
}
function PopulateImage(undoId, isCropped) {
debugger;
var dataToSend = {
MethodName: "GetImageUrl",
customerId: $('#<%=hdnCustomerId.ClientID%>').val(),
<%--registerDate: $('#<%=hdnRegisterDate.ClientID%>').val(),
membershipId: $('#<%=txtMembershipId.ClientID%>').val()--%>
<%-- cdid: $('#<%=txtMembershipId.ClientID%>').val(),--%>
};
$.post('', dataToSend, function (response) {
debugger;
var data = JSON.parse(response);
var json = data.filter(item => item.isEkyc === false);
var url1 = json[0];
var url2 = json[1];
var url3 = json[2];
var url4 = json[3];
//$("#font").attr("src", url1);
//$("#back").attr("src", url2);
if (url1) {
debugger;
$("#font").attr("src", url1.ImageUrl);
editFrontIdCrop.setAttribute('onclick', 'documentCrop( " ' + url1.FileName + ' ", " ' + url1.CdId + ' " , " ' + url1.FileType + ' ", this.id)');
$('#<%=hdnreg_front_idCdId.ClientID%>').val(url1.FileName + '|' + url1.CdId);
}
if (url2) {
$("#back").attr("src", url2.ImageUrl);
editBackIdCrop.setAttribute('onclick', 'documentCrop( " ' + url2.FileName + ' ", " ' + url2.CdId + ' " , " ' + url2.FileType + ' ", this.id)');
$('#<%=hdnreg_back_id_idCdId.ClientID%>').val(url2.FileName + '|' + url2.CdId);
}
if (undoId == "editFrontIdCrop" && isCropped == "Y") {
$('#undoFrontId').show();
undoFrontId.setAttribute('onclick', 'undoCrop( " ' + url1.FileName + ' ", " ' + url1.CdId + ' " , " ' + url1.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editBackIdCrop" && isCropped == "Y") {
$('#undoBackId').show();
undoBackId.setAttribute('onclick', 'undoCrop( " ' + url2.FileName + ' ", " ' + url2.CdId + ' " , " ' + url2.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editAdditionalIdCrop" && isCropped == "Y") {
$('#undoAdditionalId').show();
undoAdditionalId.setAttribute('onclick', 'undoCrop( " ' + url3.FileName + ' ", " ' + url3.CdId + ' " , " ' + url3.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editAdditionalId2Crop" && isCropped == "Y") {
$('#undoAdditionalId2').show();
undoAdditionalId2.setAttribute('onclick', 'undoCrop( " ' + url4.FileName + ' ", " ' + url4.CdId + ' " , " ' + url4.FileType + ' ", " ' + undoId + ' ")');
}
if (url3) {
debugger
//$("#additionalId").attr("src", url3);
$("#additionalId").attr("src", url3.ImageUrl);
editAdditionalIdCrop.setAttribute('onclick', 'documentCrop( " ' + url3.FileName + ' ", " ' + url3.CdId + ' " , " ' + url3.FileType + ' ", this.id)');
$("#divAdditional_id").show();
$('#<%=hdnreg_additional_idCdId.ClientID%>').val(url3.FileName + '|' + url3.CdId);
}
if (url4) {
// $("#additionalId2").attr("src", url4);
$("#additionalId2").attr("src", url4.ImageUrl);
editAdditionalId2Crop.setAttribute('onclick', 'documentCrop( " ' + url4.FileName + ' ", " ' + url4.CdId + ' " , " ' + url4.FileType + ' " , this.id )');
$("#divAdditional_id2").show();
$('#<%=hdnreg_additional_id2CdId.ClientID%>').val(url4.FileName + '|' + url4.CdId);
}
const filtered = data.filter(item => item.isEkyc === false);
if (filtered != null) {
var AdditionalIDFront2 = filtered.filter(item => item.DocumentName === "Additional ID Front 2")[0];
if (AdditionalIDFront2) {
$("#AdditionalIDFront2Div").show();
$("#imgAdditionalIDFront2Id").attr("src", AdditionalIDFront2.ImageUrl);
editAdditionalIDFront2.setAttribute('onclick', 'documentCrop( " ' + AdditionalIDFront2.FileName + ' ", " ' + AdditionalIDFront2.CdId + ' " , " ' + AdditionalIDFront2.FileType + ' " , this.id )');
$('#<%=hdn_AdditionalIDFront2.ClientID%>').val(AdditionalIDFront2.FileName + '|' + AdditionalIDFront2.CdId);
if (undoId == "editAdditionalIDFront2" && isCropped == "Y") {
$('#undoAdditionalIDFront2Div').show();
undoAdditionalIDFront2Div.setAttribute('onclick', 'undoCrop( " ' + AdditionalIDFront2.FileName + ' ", " ' + AdditionalIDFront2.CdId + ' " , " ' + AdditionalIDFront2.FileType + ' ", " ' + undoId + ' ")');
}
}
}
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
function documentCrop(fileName, cdId, fileType, id) {
var url = "/Remit/Administration/CustomerRegistration/DocumentCrop.aspx?cdId=" + cdId + "&fileType=" + fileType + "&fileName=" + fileName + "&id=" + id;
/* var url = "/Remit/Administration/CustomerRegistration/DocumentCrop.aspx?fileName=" + fileName;*/
var param = "width=825,height=500,resizable=1,status=1,toolbar=0,scrollbars=1,center=1";
PopUpWindow(url, param);
};
function undoCrop(fileName, cdId, fileType, id) {
//debugger;
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var registerDate = $('#<%=hdnRegisterDate.ClientID%>').val();
var membershipId = $('#<%=hdnMembershipId.ClientID%>').val();
dataToSend = { MethodName: 'undoCrop', customerId: customerId, registerDate: registerDate, membershipId: membershipId, fileName: fileName, cdId: cdId, fileType: fileType };
if (confirm('Are you sure you want to undo your changes?')) {
$.post("", dataToSend, function (response) {
var data = jQuery.parseJSON(response);
if (data.ErrorCode == 0) {
alert(data.Msg);
PopulateImage();
$('#' + id).hide();
} else {
alert(data.Msg);
}
});
}
return false;
};
</script>
</head>
@ -276,7 +423,7 @@
<td class="text" colspan="3">
<asp:Label ID="sName" runat="server" Style="padding-right: 3.2em;"></asp:Label>
</td>
<td class="text" colspan="3">
<td class="text">
<asp:Label ID="sDetail" runat="server"></asp:Label>
</td>
</tr>
@ -425,13 +572,13 @@
<table class="table table-bordered table-striped">
<tr>
<td>Purpose: </td>
<td class="text" colspan="3">
<td class="text">
<asp:Label ID="purpose" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>Source of Fund: </td>
<td class="text" colspan="3">
<td class="text">
<asp:Label ID="sourceFund" runat="server"></asp:Label>
</td>
</tr>
@ -864,7 +1011,7 @@
<div class="row">
<div class="col-md-4 form-group" id="uploadDocument" runat="server" visible="false">
<div class="file-upload" id="front">
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton required" accept="image/capture" capture="camera" />
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton required" />
<%--<input type="file" name="reg-front-id" id="reg-front-id" required="required" class="uploadbutton" accept="image/*" />--%>
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span>
@ -883,6 +1030,177 @@
</div>
</div>
</asp:Panel>
<asp:Panel ID="PanelKycDocumentUpload" runat="server" EnableViewState="false">
<div class="panel panel-default clearfix m-b-20">
<div class="panel-heading">Document Information</div>
<div class="panel-body">
<div class="col-md-6">
<div class="form-group">
<label id="lblreg_front_id">
<asp:Localize runat="server" meta:resourcekey="Register_040" Text="ID Front"></asp:Localize></label>
<%--<button id="editFrontId" ="button" class="btn btn-primary" data-action="undo">Edit ID Front</button>--%>
<input type="button" id="editFrontId" class="btn btn-info" value="Edit ID Front" />
<input type="button" id="editFrontIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoFrontId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="font" src="../../../Images/na.gif">
</div>
</div>
</div>
<div id="uploadFrontIdDiv">
<div class="file-upload" id="frontNew">
<asp:FileUpload ID="reg_front_id1" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_front_idResource1" />
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span>
<asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize>
</span>
</div>
</div>
</div>
<div class="col-md-6" id="divreg_back_id">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="ID Back"></asp:Localize></label>
<input type="button" id="editBackId" class="btn btn-info" value="Edit Id Back" />
<input type="button" id="editBackIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoBackId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="back" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadBackIdDiv">
<div class="file-upload" id="backNew">
<asp:FileUpload ID="reg_back_id" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_back_idResource1" />
<%--<input type="file" name="reg-back-id" id="reg-back-id" required="required" class="uploadbutton" accept="image/*" />--%>
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span><asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize></span>
</div>
</div>
</div>
<div class="col-md-6" id="divAdditional_id">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="Additional ID Front"></asp:Localize></label>
<input type="button" id="editAdditionalId" class="btn btn-info" value="Edit Additional Id Front" />
<input type="button" id="editAdditionalIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoAdditionalId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="additionalId" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadAdditionalIdDiv">
<div class="file-upload" id="additional_id">
<asp:FileUpload ID="reg_additional_id" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_back_idResource1" />
<%--<input type="file" name="reg-back-id" id="reg-back-id" required="required" class="uploadbutton" accept="image/*" />--%>
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span><asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize></span>
</div>
</div>
</div>
<div class="col-md-6" id="divAdditional_id2">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="Additional ID Back"></asp:Localize></label>
<input type="button" id="editAdditionalId2" class="btn btn-info" value="Edit Additional Id Back" />
<input type="button" id="editAdditionalId2Crop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoAdditionalId2" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="additionalId2" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadAdditionalIdDiv2">
<div class="file-upload" id="additional_id2">
<asp:FileUpload ID="reg_additional_id2" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_back_idResource1" />
<%--<input type="file" name="reg-back-id" id="reg-back-id" required="required" class="uploadbutton" accept="image/*" />--%>
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span><asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize></span>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="AdditionalIDFront2Div">
<div class="form-group">
<label>Additional ID Front </label>
<%-- <input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editAdditionalIDFront2" class="btn btn-warning" value="Crop" style="display: none;" />
<input type="button" id="undoAdditionalIDFront2Div" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgAdditionalIDFront2Id" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="IDFrontFeatureDiv">
<div class="form-group">
<label>Id Front Feature</label>
<%-- <input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editIDFrontFeature" class="btn btn-warning" value="Crop" />
<input type="button" id="undoIDFrontFeature" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgIDFrontFeatureId" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="customerSelfieDiv">
<div class="form-group">
<label>Customer Selfie</label>
<%-- <input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editSelfieCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoeditSelfie" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgselfieId" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="FacePictureDiv">
<div class="form-group">
<label>Customer Face Picture</label>
<input type="button" id="editFacePicture" class="btn btn-warning" value="Crop" />
<input type="button" id="undoFacePicture" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="FacePictureId" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="pnlPartnerRemarks" runat="server" EnableViewState="false">
<div class="panels" id="partnerRemarksDiv" runat="server">
<div class="form-group">
@ -1010,6 +1328,13 @@
</div>
<asp:HiddenField ID="hdnViewQuestionnaire" runat="server" />
<asp:HiddenField ID="hdnCustomerId" runat="server" />
<asp:HiddenField runat="server" ID="hdnreg_front_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_back_id_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_additional_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_additional_id2CdId" />
<asp:HiddenField runat="server" ID="hdn_AdditionalIDFront2" />
<asp:HiddenField runat="server" ID="hdnRegisterDate" />
<asp:HiddenField runat="server" ID="hdnMembershipId" />
<script type="text/javascript">
function ShowModal() {
$("#modalCollModeDetails").modal('show');
@ -1034,3 +1359,55 @@
PopUpWindow(url, param);
};
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#reg_front_id1').on('change', function (e) {
$('.loadImg').remove();
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
});
})
// Image upload for back id
$('#reg_back_id').on('change', function (e) {
$('.loadImg2').remove();
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg2"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg2 img").fadeIn("fast");
}
});
// Image upload for add back id
$('#reg_additional_id').on('change', function (e) {
debugger
$('.loadImg3').remove();
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg3"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg3 img").fadeIn("fast");
}
});
// Image upload for add back id2
$('#reg_additional_id2').on('change', function (e) {
/* $(this).closest('span').find('.loadImg1').remove();*/
$('.loadImg4').remove();
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg4"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg4 img").fadeIn("fast");
}
});
function ShowImageDetail(id) {
OpenInNewWindow(id.src);
}
</script>

307
Swift.web/Remit/UserControl/UcTransaction.ascx.cs

@ -16,10 +16,12 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.UI.HtmlControls;
namespace Swift.web.Remit.UserControl
@ -36,6 +38,7 @@ namespace Swift.web.Remit.UserControl
private const string ModifyPayoutLocationId = "20121520";
private const string ModifyPayoutLocationIdAg = "40101730";
private readonly SwiftGrid _grid = new SwiftGrid();
OnlineCustomerDao _cd = new OnlineCustomerDao();
public bool ShowDetailBlock { get; set; }
public bool ShowLogBlock { get; set; }
public bool ShowCommentBlock { get; set; }
@ -180,6 +183,10 @@ namespace Swift.web.Remit.UserControl
var tRow = ds.Tables[0].Rows[0];
customerSignatureImg.ImageUrl = "/Remit/Transaction/TxnDocView/TxnDocView.ashx?txnDate=" + tRow["createdDate"].ToString() + "&controlNo=" + tRow["controlNo"].ToString();
hdnCustomerId.Value = tRow["sCustomerId"].ToString();
hdnRegisterDate.Value = tRow["registerDate"].ToString();
hdnMembershipId.Value = tRow["uniqueId"].ToString();
TranFound = true;
HoldTranId = tRow["holdTranId"].ToString();
ShowQuestionaireLink(HoldTranId, displayType, viewType);
@ -498,6 +505,266 @@ namespace Swift.web.Remit.UserControl
}
}
}
public class CustomerDocumentView
{
public string CdId { get; set; }
public string FileName { get; set; }
public string FileType { get; set; }
public string DocumentName { get; set; }
public string ImageUrl { get; set; }
public bool isEkyc { get; set; }
}
private List<string> GetDocTypeListNew()
{
List<string> docType = new List<string>();
docType.Add("ID Front");
docType.Add("ID Back");
docType.Add("Additional ID Front");
docType.Add("Additional ID Back");
return docType;
}
public void GetImageUrl()
{
string customerId = hdnCustomerId.Value;
string registerDate = hdnRegisterDate.Value;
string membershipId = hdnMembershipId.Value;
var documentDetails = _cd.GetDocumentByCustomerId(customerId);
List<CustomerDocumentView> customerDocument = new List<CustomerDocumentView>();
List<DataRow> docList = new List<DataRow>();
List<string> docTypeList = GetDocTypeListNew();
if (documentDetails != null)
{
docList = documentDetails.Rows.Cast<DataRow>().ToList();
foreach (var item in docTypeList)
{
var docDetails = docList.Where(x => x.Field<string>("documentName").ToLower().ToString().Equals(item.ToLower())).FirstOrDefault();
if (docDetails != null)
{
CustomerDocumentView doc = new CustomerDocumentView
{
CdId = docDetails.Field<int>("cdid").ToString(),// cast error aauxa eta
FileName = docDetails.Field<string>("fileName").ToString(),
FileType = docDetails.Field<string>("fileType") == null ? "" : docDetails.Field<string>("fileType").ToString(),
DocumentName = docDetails.Field<string>("documentName").ToString(),
ImageUrl = "/Handler/CustomerSignature.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + docDetails.Field<string>("fileName").ToString(),
isEkyc = false
};
customerDocument.Add(doc);
}
}
}
Response.ContentType = "text/plain";
var serializer = new JavaScriptSerializer();
var json = serializer.Serialize(customerDocument);
Response.Write(json);
Response.End();
}
public void GetImageUrl1()
{
string customerId = hdnCustomerId.Value;
string registerDate = hdnRegisterDate.Value;
string membershipId = hdnMembershipId.Value;
var documentDetails = _cd.GetDocumentByCustomerId(customerId);
string[] imageUrlArray = new string[4];
StringBuilder imageHtml = new StringBuilder();
List<DataRow> docList = new List<DataRow>();
if (documentDetails != null)
{
docList = documentDetails.Rows.Cast<DataRow>().ToList();
docList = docList.Where(x => !string.IsNullOrEmpty(x.Field<string>("documentName"))).ToList();
var IdFront = docList.Where(x => x.Field<string>("documentName").ToString().Equals("ID Front")).FirstOrDefault();
if (IdFront != null)
{
imageUrlArray[0] = "/Handler/CustomerSignature.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + IdFront.Field<string>("fileName").ToString();
}
var IdBack = docList.Where(x => x.Field<string>("documentName").ToString().Equals("ID Back")).FirstOrDefault();
if (IdBack != null)
{
imageUrlArray[1] = "/Handler/CustomerSignature.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + IdBack.Field<string>("fileName").ToString();
}
var AdditionalIdFront = docList.Where(x => x.Field<string>("documentName") != null && x.Field<string>("documentName").ToString().Equals("Additional ID Front")).SingleOrDefault();
if (AdditionalIdFront != null)
{
imageUrlArray[2] = "/Handler/CustomerSignature.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + AdditionalIdFront.Field<string>("fileName").ToString();
}
else
imageUrlArray[2] = "";
var AdditionalIdBack = docList.Where(x => x.Field<string>("documentName") != null && x.Field<string>("documentName").ToString().Equals("Additional ID Back")).FirstOrDefault();
if (AdditionalIdBack != null)
{
imageUrlArray[3] = "/Handler/CustomerSignature.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + AdditionalIdBack.Field<string>("fileName").ToString();
}
else
imageUrlArray[3] = "";
}
Response.ContentType = "text/plain";
var serializer = new JavaScriptSerializer();
var json = serializer.Serialize(imageUrlArray);
Response.Write(json);
Response.End();
}
private void saveCustomerDocument()
{
string customerId = hdnCustomerId.Value;
string registerDate = hdnRegisterDate.Value;
string membershipId = hdnMembershipId.Value;
HttpFileCollection fileCollection = Request.Files;
for (int i = 0; i < fileCollection.AllKeys.Length; i++)
{
HttpPostedFile file = fileCollection[i];
if (file != null)
{
string documentTypeName = "";
string documentType = "";
string fileType = "";
string cdid = "";
string filename = "";
var keyName = fileCollection.AllKeys[i];
keyName = keyName.Replace("ucTran$", "");
if (keyName.ToLower().Equals("reg_front_id1"))
{
documentTypeName = "ID Card(Front)";
documentType = "11394";
if (hdnreg_front_idCdId != null & !string.IsNullOrEmpty(hdnreg_front_idCdId.Value))
{
var r = hdnreg_front_idCdId.Value.Split('|');
filename = r[0];
cdid = r[1];
}
}
if (keyName.ToLower().Equals("reg_back_id"))
{
documentTypeName = "ID Card(Back)";
documentType = "11395";
if (hdnreg_front_idCdId != null & !string.IsNullOrEmpty(hdnreg_back_id_idCdId.Value))
{
var r = hdnreg_back_id_idCdId.Value.Split('|');
filename = r[0];
cdid = r[1];
}
}
if (keyName.ToLower().Equals("reg_additional_id"))
{
documentTypeName = "Additional ID (Front)";
documentType = "11396";
if (hdnreg_front_idCdId != null & !string.IsNullOrEmpty(hdnreg_additional_idCdId.Value))
{
var r = hdnreg_additional_idCdId.Value.Split('|');
if (r.Count() > 1)
{
filename = r[0];
cdid = r[1];
}
else
cdid = r[0];
}
}
if (keyName.ToLower().Equals("reg_additional_id2"))
{
documentTypeName = "Additional ID (Back)";
documentType = "11397";
if (hdnreg_front_idCdId != null & !string.IsNullOrEmpty(hdnreg_additional_id2CdId.Value))
{
var r = hdnreg_additional_id2CdId.Value.Split('|');
if (r.Count() > 1)
{
filename = r[0];
cdid = r[1];
}
else
cdid = r[0];
}
}
if (file.ContentLength > 0 && !string.IsNullOrEmpty(file.FileName))
{
string fileNameNew = (!string.IsNullOrWhiteSpace(file.FileName) ? UploadDocument(file, customerId, documentTypeName, membershipId, registerDate, filename, out fileType)
: UploadDocument(file, customerId, documentType, membershipId, registerDate, filename, out fileType));
//CustomerDocument cm = new CustomerDocument();
//cm.customerId = result[0];
//cm.fileDescription = "";
//cm.documentType = documentType;
//cm.fileUrl = fileName;
//cm.fileType = fileType;
if (fileNameNew.Contains("notValid extensions."))
{
GetStatic.CallBackJs1(Page, "Print Message", "ManageMessage('" + fileNameNew + "');");
continue;
}
else
_cd.UpdateCustomerDocument(cdid, customerId, fileNameNew, documentTypeName, fileType, documentType, GetStatic.GetUser());
}
}
}
}
private string UploadDocument(HttpPostedFile doc, string customerId, string documentType, string membershipId, string registeredDate, string filenameOld, out string fileType)
{
fileType = "";
string fName = "";
try
{
fileType = doc.ContentType;
string fileExtension = new FileInfo(doc.FileName).Extension;
string documentExtension = GetStatic.ReadWebConfig("customerDocFileExtension", "");
if (documentExtension.ToLower().Contains(fileExtension.ToLower()))
{
string fileName = customerId + "_" + documentType.Replace(" ", string.Empty) + "_" + DateTime.Now.Hour.ToString() + DateTime.Now.Millisecond.ToString() + "_" + registeredDate.Replace("-", "_") + fileExtension;
string path = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registeredDate.Replace("-", "\\") + "\\" + membershipId;
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
bool folderExists = Directory.Exists(path + "\\deleted");
if (!folderExists)
Directory.CreateDirectory(path + "\\deleted");
String filename_initial = path + "\\deleted\\" + $"org_{filenameOld}";
String filename_current = filename_initial;
var count = 0;
while (File.Exists(filename_current))
{
count++;
filename_current = Path.GetDirectoryName(filename_initial)
+ Path.DirectorySeparatorChar
+ Path.GetFileNameWithoutExtension(filename_initial)
+ count.ToString()
+ Path.GetExtension(filename_initial);
}
File.Move(path + "\\" + filenameOld, filename_current);
doc.SaveAs(path + "\\" + filenameOld);
fName = filenameOld;
}
else
{
fName = "notValid extensions.";
}
}
catch (Exception ex)
{
GetStatic.LogError(ex, "UploadDocument");
fName = "";
}
return fName;
}
private void PopulateBankDetails(DataTable dataTable)
{
@ -607,8 +874,46 @@ namespace Swift.web.Remit.UserControl
DeleteTroubleTicket();
// ShowLog();
}
if(methodName == "GetCustomerDetails")
{
GetCustomerDetails();
}
if (methodName == "GetImageUrl")
{
GetImageUrl();
}
}
private void GetCustomerDetails()
{
string eId = Request.Form["Id"];
var dt = _cd.GetDetailsForEditCustomer(eId, GetStatic.GetUser());
Response.ContentType = "text/plain";
var json = DataTableToJson(dt);
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;
}
private void DeleteTroubleTicket()
{
var obj = new TranViewDao();
@ -944,6 +1249,7 @@ namespace Swift.web.Remit.UserControl
{
SaveComplianceApproveRemarks();
//DbResult result = obj.CheckTranInBothRule(GetStatic.GetUser(), hddTranId.Value);
//if(result.ErrorCode == "1")
//{
@ -1000,6 +1306,7 @@ namespace Swift.web.Remit.UserControl
}
public void SaveComplianceApproveRemarks(string cashHoldLimitFlag = "")
{
saveCustomerDocument();
DbResult dbResult = obj.SaveApproveRemarksComplaince(GetStatic.GetUser(), lblControlNo.Text, hddTranId.Value, remarksCompliance.Text, remarksOFAC.Text, remarksCashLimitHold.Text, cashHoldLimitFlag);

154
Swift.web/Remit/UserControl/UcTransaction.ascx.designer.cs

@ -339,7 +339,7 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.WebControls.Label sIdType;
/// <summary>
/// sEmail control.
/// nativeCountry control.
/// </summary>
/// <remarks>
/// Auto-generated field.
@ -357,7 +357,7 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.WebControls.Label occupation;
/// <summary>
/// nativeCountry control.
/// sEmail control.
/// </summary>
/// <remarks>
/// Auto-generated field.
@ -609,7 +609,15 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.WebControls.Label pAgentLocation;
/// <summary>
/// payer 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.Label payer;
/// <summary>
/// pAgentDistrict control.
/// </summary>
/// <remarks>
@ -1069,7 +1077,15 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.WebControls.CheckBox chkEmail;
/// <summary>
/// chkPush 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.CheckBox chkPush;
/// <summary>
/// btnAdd control.
/// </summary>
/// <remarks>
@ -1231,6 +1247,51 @@ namespace Swift.web.Remit.UserControl
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl populateDocument;
/// <summary>
/// PanelKycDocumentUpload 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.Panel PanelKycDocumentUpload;
/// <summary>
/// reg_front_id1 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.FileUpload reg_front_id1;
/// <summary>
/// reg_back_id 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.FileUpload reg_back_id;
/// <summary>
/// reg_additional_id 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.FileUpload reg_additional_id;
/// <summary>
/// reg_additional_id2 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.FileUpload reg_additional_id2;
/// <summary>
/// pnlPartnerRemarks control.
/// </summary>
@ -1259,9 +1320,33 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.WebControls.DropDownList ddlRemarks;
/// <summary>
/// panelCustomerDocDetails 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.Panel panelCustomerDocDetails;
/// <summary>
/// customerDoc 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 customerDoc;
/// <summary>
/// customerDocDetails 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 customerDocDetails;
/// <summary>
/// pnlQuestionaire control.
/// </summary>
/// <remarks>
@ -1280,7 +1365,7 @@ namespace Swift.web.Remit.UserControl
protected global::System.Web.UI.HtmlControls.HtmlGenericControl questionaireDiv;
/// <summary>
/// rpt_grid control.
/// qaGrid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
@ -1413,5 +1498,68 @@ namespace Swift.web.Remit.UserControl
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnCustomerId;
/// <summary>
/// hdnreg_front_idCdId 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 hdnreg_front_idCdId;
/// <summary>
/// hdnreg_back_id_idCdId 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 hdnreg_back_id_idCdId;
/// <summary>
/// hdnreg_additional_idCdId 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 hdnreg_additional_idCdId;
/// <summary>
/// hdnreg_additional_id2CdId 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 hdnreg_additional_id2CdId;
/// <summary>
/// hdn_AdditionalIDFront2 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 hdn_AdditionalIDFront2;
/// <summary>
/// hdnRegisterDate 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 hdnRegisterDate;
/// <summary>
/// hdnMembershipId 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 hdnMembershipId;
}
}
Loading…
Cancel
Save