gagan 4 years ago
parent
commit
8b2bd628b8
  1. 2
      Database/Sp/proc_customerInfo.sql
  2. 910
      JMEAgentSystem/Properties/PublishProfiles/FolderProfile.pubxml.user
  3. 71
      JMEAgentSystem/Scripts/AddIdPitcure/addPicture.js
  4. 310
      JMEAgentSystem/Scripts/Customer/CustomerRegistration.js
  5. 4
      JMEAgentSystem/Scripts/Receiver/ReceiverRegistation.js
  6. 3
      JMEAgentSystem/Scripts/Receiver/ReceiverRegistrationNew.js
  7. 10
      JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx
  8. 121
      JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx.cs
  9. 9
      JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx.designer.cs
  10. 2
      JMEAgentSystem/WebPages/BenificiaryRegistration/Manage.aspx
  11. 3
      JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx
  12. 194
      JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx.cs
  13. 9
      JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx.designer.cs
  14. 2
      JMEAgentSystem/WebPages/CustomerRegistration/PrintDetails.aspx
  15. 1
      JMEAgentSystem/WebPages/GetFileView.ashx.cs
  16. 188
      Repository/Repository/OnlineCustomerDao/CustomerRepository.cs

2
Database/Sp/proc_customerInfo.sql

@ -154,7 +154,7 @@ BEGIN
ri.idNumber ,
ri.placeOfIssue ,
CASE WHEN ri.paymentmode = '1' THEN 'Cash Payment' ELSE 'Bank Deposit' END paymentMode ,
ISNULL(ABBL.BRANCH_NAME ,'-') bankBranchName ,
ISNULL(ABBL.BRANCH_NAME ,ri.bankbranchname) bankBranchName ,
ISNULL(CASE WHEN ri.country = 'NEPAL' THEN ISNULL(ABL.BANK_NAME,'ANY WHERE') ELSE ISNULL(ABL.BANK_NAME ,'-') END,'-') payOutPartner ,
ISNULL(ri.bankName,'-') bankName,
ISNULL(ri.receiverAccountNo,'-') receiverAccountNo,

910
JMEAgentSystem/Properties/PublishProfiles/FolderProfile.pubxml.user
File diff suppressed because it is too large
View File

71
JMEAgentSystem/Scripts/AddIdPitcure/addPicture.js

@ -1,6 +1,73 @@
function ValidateRequiredfields() {
var formData = new FormData();
function ValidateRequiredfields() {
var reqField = "reg_back_id,reg_front_id,";
if (ValidRequiredFieldWithDoc(reqField) === false) {
return false;
}
} else {
SavePhotoFromAjaxCall();
return true
}
}
$(document).ready(function () {
$("#" + mId + "reg_front_id").on("change", function (event) {
compress(event);
});
$("#" + mId + "reg_back_id").on("change", function (event) {
compress(event);
});
});
function SavePhotoFromAjaxCall() {
formData.append("MethodName", "SavePhotoFromAjaxCall");
$.ajax({
url: "",
type: "post",
data: formData,
dataType:"json",
contentType: false, // Not to set any content header
processData: false, // Not to process data
success: function (response) {
if (response.ErrorCode == "1") {
alert(response.Msg);
return false;
} else {
debugger
alert(response.Msg);
$(location).attr("href", "Manage.aspx");
return true;
}
},
error: function (error) {
alert("Something went wrong!!!");
return false;
}
});
}
function compress(e) {
const width = 300;
const height = 400;
const fileName = e.target.files[0].name;
const reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = event => {
const img = new Image();
img.src = event.target.result;
img.onload = () => {
const elem = document.createElement('canvas');
elem.width = width;
elem.height = height;
const ctx = elem.getContext('2d');
// img.width and img.height will contain the original dimensions
ctx.drawImage(img, 0, 0, width, height);
ctx.canvas.toBlob((blob) => {
const file = new File([blob], fileName, {
type: 'image/jpeg',
lastModified: Date.now()
});
formData.append(file.fileName, file);
}, 'image/jpeg', 1);
},
reader.onerror = error => console.log(error);
};
}

310
JMEAgentSystem/Scripts/Customer/CustomerRegistration.js

@ -1,10 +1,18 @@
$(document).ready(function () {
var formData = new FormData();
$(document).ready(function () {
$("#" + mId + "reg_front_id").on("change", function (event) {
compress(event);
});
$("#" + mId + "reg_back_id").on("change", function (event) {
compress(event);
});
$("#" + mId + "occupation").prop("disabled", true);
$("#" + mId + "recReceiverAccountNo").hide();
$("#" + mId + "agentBankBranchDiv").hide();
//PopulateCustomerData();
//PopulateBenifiairyData();
PopulateCustomerData();
PopulateBenifiairyData();
$("#" + mId + "ExpireDate").click(function () {
$("#" + mId + "ExpireDate").val("");
@ -20,7 +28,6 @@
$("#" + mId + "recTxtIdValue").val("");
})
$("#MainContent_recDdlPaymentMode,#MainContent_recDdlPayoutPatner").on("change", function () {
debugger
let pmode = $("#" + mId + "recDdlPaymentMode").val();
if (pmode == "2") {
$("#" + mId + "recReceiverAccountNo").show();
@ -84,17 +91,6 @@
txtSearchData.InitFunction();
});
//$(document).on("change", "#ContentPlaceHolder1_txtSearchData_aSearch", function () {
// searchValue = $(this).val();
// if (searchValue === null || searchValue === "") {
// $("#ContentPlaceHolder1_txtSearchData_aText").val("");
// $("#ContentPlaceHolder1_addEditPanel").hide();
// $("#" + mId + "ddlCustomerType").val("4700");
// $("#" + mId + "membershipDiv").hide();
// $("#" + mId + "customerType").hide();
// $("#" + mId + "txtMembershipId").val("");
// }
//});
//mobile country code added
$("#" + mId + "mobile").intlTelInput({
@ -104,7 +100,6 @@
});
$("#" + mId + "mobile").on("change", function () {
debugger
var input = $("#" + mId + "mobile");
var countryCode = $(".customer .dial-code").text();
var mobileNo = input.val();
@ -144,16 +139,16 @@
//, "#CustomerAgreement", "#BenificiaryAgreement", "#TransactionAgreement"
$("#agreement,#MainContent_CustomerAgreement").click(function () {
if ($("#agreement").is(":checked") && $("#MainContent_CustomerAgreement").is(":checked")) {
$("#" + mId + "registerCustomerAndReceiver").removeAttr("disabled");
$("#registerCustomerAndReceiver").removeAttr("disabled");
} else {
$("#" + mId + "registerCustomerAndReceiver").attr("disabled", "disabled");
$("#registerCustomerAndReceiver").attr("disabled", "disabled");
}
});
$("#btnIAgree").on("click", function () {
$("input[name=agreement]").prop("checked", true);
if ($("#agreement").is(":checked") && $("#MainContent_CustomerAgreement").is(":checked")) {
$("#" + mId + "registerCustomerAndReceiver").removeAttr("disabled");
$("#registerCustomerAndReceiver").removeAttr("disabled");
}
});
CustomerSignature();
@ -229,7 +224,7 @@ function CallBackAutocomplete(id) {
$("#" + mId + "hdnCustomerId").val(d[0]);
LoadcustomerData();
$("#" + mId + "addEditPanel").removeAttr("style");
$("#" + mId + "registerCustomerAndReceiver").removeAttr("disabled");
$("#registerCustomerAndReceiver").removeAttr("disabled");
}
function LoadcustomerData() {
@ -336,17 +331,20 @@ function ParseCustomerData(response) {
}
function CheckMasterFormValidation() {
debugger
var requiredFieldAllPresent = ValidateRequiredfields();
if (requiredFieldAllPresent) {
return CheckSignatureCustomerFromCustomerRegister();
var result = CheckSignatureCustomerFromCustomerRegister();
if (result) {
RegisterCustomerAndReeiverFromAjaxCall();
} else {
return result;
}
} else {
return requiredFieldAllPresent;
}
}
function ValidateRequiredfields() {
if (CheckRequiredFields() == true && CheckCustomerValidation() == true && CheckReceiverValidation() == true && CheckDocumentFormat() == true) {
//PrepareDataForAjaxCall();
var a = $("#" + mId + "recDdlPaymentMode option:selected").val();
var b = $("#" + mId + "recDdlPayoutPatner option:selected").val();
var c = $("#" + mId + "recDDLBankBranch option:selected").val();
@ -369,9 +367,8 @@ function CheckRequiredFields() {
if ($("#" + mId + "expiryDiv").hasClass("hidden")) {
reqField = reqField.replace(",ExpireDate,", ",");
}
//receiver required fields
reqField = reqField + "recDdlCountry,recTxtReceiverFName,recTxtReceiverLName,recDdlNativeCountry,recTxtReceiverAddress,recTxtRecMobileNo,recDdlPaymentMode,";
reqField = reqField + "recDdlCountry,recTxtReceiverFName,recTxtReceiverLName,recDdlNativeCountry,recTxtReceiverAddress,recDdlPaymentMode,";
//let pmode = $("#" + mId + "recDdlPaymentMode").val();
//if (pmode == "2") {
// reqField = reqField + "recDdlPayoutPatner,recTxtBenificaryAc,recDDLBankBranch,"
@ -384,7 +381,6 @@ function CheckRequiredFields() {
}
//document required
reqField = reqField + "reg_front_id,reg_back_id,";
if (ValidRequiredFieldWithDoc(reqField) === false) {
return false;
} else {
@ -394,8 +390,6 @@ function CheckRequiredFields() {
}
function CheckDocumentFormat() {
debugger
var frontImg = $('#MainContent_reg_front_id').val();
var backImg = $('#MainContent_reg_back_id').val();
@ -493,59 +487,6 @@ function CheckReceiverValidation() {
return true;
}
function PrepareDataForAjaxCall() {
debugger
var firstName = $("#" + mId + "firstName");
var lastName = $("#" + mId + "lastName ");
var countryList = $("#" + mId + "countryList ");
var zipCode = $("#" + mId + "zipCode");
var ddlState = $("#" + mId + "ddlState ");
var city = $("#" + mId + "city");
var txtStreet = $("#" + mId + "txtStreet");
var txtAdditionalAddress = $("#" + mId + "txtAdditionalAddress");
var genderList = $("#" + mId + "genderList");
var nativeCountry = $("#" + mId + "nativeCountry");
var dob = $("#" + mId + "dob");
var ddlVisaStatus = $("#" + mId + "ddlVisaStatus");
var occupation = $("#" + mId + "occupation");
var ddSourceOfFound = $("#" + mId + "ddSourceOfFound");
var idType = $("#" + mId + "idType");
var verificationTypeNo = $("#" + mId + "verificationTypeNo");
var IssueDate = $("#" + mId + "IssueDate");
var expireRequired = $("#" + mId + "expireRequired ");
var paymentmode = $("#" + mId + "recDdlPaymentMode option:selected ").val();
alert(paymentmode);
var DataToSend = {
MethodName: "SaveCustomerDetails"
, firstName: firstName
, lastName: lastName
, countryList: countryList
, zipCode: zipCode
, ddlState: ddlState
, city: city
, txtStreet: txtStreet
, txtAdditionalAddress: txtAdditionalAddress
, genderList: genderList
, nativeCountry: nativeCountry
, dob: dob
, ddlVisaStatus: ddlVisaStatus
, occupation: occupation
, ddSourceOfFound: ddSourceOfFound
, idType: idType
, verificationTypeNo: verificationTypeNo
, IssueDate: IssueDate
, expireRequired: expireRequired
, paymentmode: paymentmode
}
var url = "";
$.post(url, DataToSend, function (response) {
alert(response);
}).fail(function () {
});
}
function loadImage(filePath, id) {
$("#" + id).attr("src", path);
@ -609,7 +550,6 @@ function GetAddressByZipCode() {
var url = "";
$.post(url, dataToSend, function (erd) {
if (erd !== null) {
debugger
var dr = jQuery.parseJSON(erd);
if (erd == false) {
$("#" + mId + "ddlState").val("");
@ -773,4 +713,210 @@ function PopulateBenifiairyData() {
$("#" + mId + "recDdlPurposeOfRemitance").val('11141');
$("#" + mId + "recTxtRemarksRec").val('remarksrec');
$("#" + mId + "recDdlNativeCountry").val('16');
}
function compress(e) {
const width = 300;
const height = 400;
const fileName = e.target.files[0].name;
const reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = event => {
const img = new Image();
img.src = event.target.result;
img.onload = () => {
const elem = document.createElement('canvas');
elem.width = width;
elem.height = height;
const ctx = elem.getContext('2d');
// img.width and img.height will contain the original dimensions
ctx.drawImage(img, 0, 0, width, height);
ctx.canvas.toBlob((blob) => {
const file = new File([blob], fileName, {
type: 'image/jpeg',
lastModified: Date.now()
});
formData.append(file.fileName, file);
}, 'image/jpeg', 1);
},
reader.onerror = error => console.log(error);
};
}
function RegisterCustomerAndReeiverFromAjaxCall() {
debugger
var firstName = $("#" + mId + "firstName").val();
var middleName = $("#" + mId + "middleName").val();
var lastName = $("#" + mId + "lastName").val();
var countryList = $("#" + mId + "countryList").val();
var zipCode = $("#" + mId + "zipCode").val();
var state = $("#" + mId + "ddlState").val();
var city = $("#" + mId + "city").val();
var street = $("#" + mId + "txtStreet").val();
var txtAdditionalAddress = $("#" + mId + "txtAdditionalAddress").val();
var genderList = $("#" + mId + "genderList").val();
var nativeCountry = $("#" + mId + "nativeCountry option:selected").val();
var dob = $("#" + mId + "dob").val();
var email = $("#" + mId + "email").val();
var phoneNumber = $("#" + mId + "phoneNumber").val();
var mobile = $("#" + mId + "mobile").val();
var ddlVisaStatus = $("#" + mId + "ddlVisaStatus option:selected").val();
var ddlEmployeeBusType = $("#" + mId + "ddlEmployeeBusType option:selected").val();
var txtNameofEmployeer = $("#" + mId + "txtNameofEmployeer").val();
var occupation = $("#" + mId + "occupation").val();
var occupationText = $("#" + mId + "occupationText").val();
var ddSourceOfFound = $("#" + mId + "ddSourceOfFound option:selected").val();
var ddlSalary = $("#" + mId + "ddlSalary").val();
var idType = $("#" + mId + "idType").val().split('|')[0];
var verificationTypeNo = $("#" + mId + "verificationTypeNo").val();
var IssueDate = $("#" + mId + "IssueDate").val();
var ExpireDate = $("#" + mId + "ExpireDate").val();
var rbRemitanceAllowed = $("input[name='ctl00$MainContent$rbRemitanceAllowed']:checked").val();
var rbOnlineLogin = $("input[name='ctl00$MainContent$rbOnlineLogin']:checked").val();
var ddlDocType = $("#" + mId + "ddlDocType option:selected").val() == undefined ? "" : $("#" + mId + "ddlDocType option:selected").val();
var txtRemarks = $("#" + mId + "txtRemarks").val();
var occupationHidden = $("#" + mId + "occupationHidden").val();
//receiver data
var recDdlCountry = $("#" + mId + "recDdlCountry option:selected").val().split('(')[0];
var recDdlBenificiaryType = $("#" + mId + "recDdlBenificiaryType option:selected").val();
var recTxtReceiverFName = $("#" + mId + "recTxtReceiverFName").val();
var recTxtReceiverMName = $("#" + mId + "recTxtReceiverMName").val();
var recTxtReceiverLName = $("#" + mId + "recTxtReceiverLName").val();
var recTxtEmail = $("#" + mId + "recTxtEmail").val();
var recDdlNativeCountry = $("#" + mId + "recDdlNativeCountry option:selected").val();
var recTxtReceiverAddress = $("#" + mId + "recTxtReceiverAddress").val();
var recTxtReceiverCity = $("#" + mId + "recTxtReceiverCity").val();
var recTxtContactNo = $("#" + mId + "recTxtContactNo").val();
var recTxtRecMobileNo = $("#" + mId + "recTxtRecMobileNo").val();
var recDdlIdType = $("#" + mId + "recDdlIdType option:selected").val();
var recTxtIdValue = $("#" + mId + "recTxtIdValue").val();
var recTxtPlaceOfIssue = $("#" + mId + "recTxtPlaceOfIssue").val();
var recDdlRelationship = $("#" + mId + "recDdlRelationship option:selected").val() == undefined ? "" : $("#" + mId + "recDdlRelationship option:selected").val();
var recDdlPurposeOfRemitance = $("#" + mId + "recDdlPurposeOfRemitance option:selected").val() == undefined ? "" : $("#" + mId + "recDdlPurposeOfRemitance option:selected").val();
var purposeOther = $("#" + mId + "purposeOther").val();
var recOtherRelationshipTextBox = $("#" + mId + "recOtherRelationshipTextBox").val();
var recDdlPaymentMode = $("#" + mId + "recDdlPaymentMode").val();
var recDdlPayoutPatner = $("#" + mId + "recDdlPayoutPatner").val();
var recTxtBenificaryAc = $("#" + mId + "recTxtBenificaryAc").val();
var recDDLBankBranch = $("#" + mId + "recDDLBankBranch").val();
var recTxtRemarksRec = $("#" + mId + "recTxtRemarksRec").val();
var branch_manual = $("#" + mId + "branch_manual").val();
var hddImgURL = $("#" + mId + "hddImgURL").val();
formData.append("MethodName", "SaveCustomerAndReceiver");
formData.append("firstName", firstName);
formData.append("middleName", middleName);
formData.append("lastName", lastName);
formData.append("countryList", countryList);
formData.append("zipCode", zipCode);
formData.append("state", state);
formData.append("city", city);
formData.append("street", street);
formData.append("txtAdditionalAddress", txtAdditionalAddress);
formData.append("genderList", genderList);
formData.append("nativeCountry", nativeCountry);
formData.append("dob", dob);
formData.append("email", email);
formData.append("phoneNumber", phoneNumber);
formData.append("mobile", mobile);
formData.append("ddlVisaStatus", ddlVisaStatus);
formData.append("ddlEmployeeBusType", ddlEmployeeBusType);
formData.append("txtNameofEmployeer", txtNameofEmployeer);
formData.append("occupation", occupation);
formData.append("occupationText", occupationText);
formData.append("ddSourceOfFound", ddSourceOfFound);
formData.append("ddlSalary", ddlSalary);
formData.append("idType", idType);
formData.append("verificationTypeNo", verificationTypeNo);
formData.append("IssueDate", IssueDate);
formData.append("ExpireDate", ExpireDate);
formData.append("rbRemitanceAllowed", rbRemitanceAllowed);
formData.append("rbOnlineLogin", rbOnlineLogin);
formData.append("ddlDocType", ddlDocType);
formData.append("txtRemarks", txtRemarks);
formData.append("recDdlCountry", recDdlCountry);
formData.append("recDdlBenificiaryType", recDdlBenificiaryType);
formData.append("recTxtReceiverFName", recTxtReceiverFName);
formData.append("recTxtReceiverMName", recTxtReceiverMName);
formData.append("recTxtReceiverLName", recTxtReceiverLName);
formData.append("recTxtEmail", recTxtEmail);
formData.append("recDdlNativeCountry", recDdlNativeCountry);
formData.append("recTxtReceiverAddress", recTxtReceiverAddress);
formData.append("recTxtReceiverCity", recTxtReceiverCity);
formData.append("recTxtContactNo", recTxtContactNo);
formData.append("recTxtRecMobileNo", recTxtRecMobileNo);
formData.append("recDdlIdType", recDdlIdType);
formData.append("recTxtIdValue", recTxtIdValue);
formData.append("recTxtPlaceOfIssue", recTxtPlaceOfIssue);
formData.append("recDdlRelationship", recDdlRelationship);
formData.append("recDdlPurposeOfRemitance", recDdlPurposeOfRemitance);
formData.append("purposeOther", purposeOther);
formData.append("recDdlPaymentMode", recDdlPaymentMode);
formData.append("recDdlPayoutPatner", recDdlPayoutPatner);
formData.append("recTxtBenificaryAc", recTxtBenificaryAc);
formData.append("recDDLBankBranch", recDDLBankBranch);
formData.append("recTxtRemarksRec", recTxtRemarksRec);
formData.append("recOtherRelationshipTextBox", recOtherRelationshipTextBox);
formData.append("branch_manual", branch_manual);
formData.append("hddImgURL", hddImgURL);
$.ajax({
url: "",
type: "post",
data: formData,
dataType: "json",
contentType: false, // Not to set any content header
processData: false, // Not to process data
success: function (response) {
debugger
if (response.ErrorCode == "1") {
alert(response.Msg);
return false;
} else {
var url = "PrintDetails.aspx?membershipId=" + response.Id.split('|')[1] + "&receiverId=" + response.Id.split('|')[3] + "";
$(location).attr("href", url);
return true;
}
},
error: function (error) {
alert("Something went wrong!!!");
return false;
}
});
}

4
JMEAgentSystem/Scripts/Receiver/ReceiverRegistation.js

@ -10,7 +10,6 @@
$(".main-nav").hide();
}
$("#" + mId + "recDdlPurposeOfRemitance").on("change", function () {
debugger
let purposeValue = $("#" + mId + "recDdlPurposeOfRemitance option:selected").val();
if (purposeValue == '11347') {
$("#purposeOtherDiv").show();
@ -20,7 +19,6 @@
});
$("#" + mId + "register").click(function () {
debugger
var isFormDataValid = CheckFormValidation();
if (isFormDataValid === 'true') {
var customerSignature = CheckSignatureCustomerFromCustomerRegister();
@ -373,7 +371,6 @@ $(document).ready(function () {
$("#" + mId + "recDdlCountry").on("change", function () {
var country = $("#" + mId + "recDdlCountry option:selected ").text().split('(')[0];
debugger
if (country.toUpperCase() === 'NEPAL' || country.toUpperCase() === 'VIETNAM') {
$('#branchSelect').hide();
$('#branchManual').show();
@ -384,7 +381,6 @@ $(document).ready(function () {
}
PopulateCountryFlagForMobileNumber();
PopulatePaymentMethod();
debugger
PopulatePayoutPartner();
});

3
JMEAgentSystem/Scripts/Receiver/ReceiverRegistrationNew.js

@ -284,7 +284,6 @@ function showTextBox() {
}
function CheckFormValidation(e) {
debugger
$("#" + mId + "ddlIdType").removeAttr("style");
$("#" + mId + "txtIdValue").removeAttr("style");
@ -302,7 +301,6 @@ function CheckFormValidation(e) {
if (ValidRequiredField(reqField) === false) {
return false;
}
debugger
var pMode = $("#" + mId + "ddlPaymentMode").val();
var pAgent = $("#" + mId + "ddlPayoutPatner").val();
if (pMode == "2") {
@ -359,6 +357,7 @@ function save() {
data: data,
dataType: "json",
success: function (response) {
alert(response);
if (response.ErrorCode == "1") {
alert(response.Msg);
$("#" + mId + "register").prop("disabled", false);

10
JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx

@ -32,9 +32,10 @@
</div>
</div>
</div>
<div class="file-upload" id="front">
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton" accept="image/capture" capture="camera"/>
<%--<input type="file" name="reg-front-id" id="reg-front-id" required="required" class="uploadbutton" accept="image/*" />--%>
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton" accept="image/capture"/>
<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>
@ -58,7 +59,7 @@
</div>
</div>
<div class="file-upload" id="back">
<asp:FileUpload ID="reg_back_id" type="file" runat="server" class="uploadbutton" accept="image/capture" capture="camera"/>
<asp:FileUpload ID="reg_back_id" type="file" runat="server" class="uploadbutton" accept="image/capture" />
<%--<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>
@ -66,8 +67,7 @@
</div>
</div>
<div class="col-md-6 form-group">
<%--<asp:Button ID="registerCustomerAndReceiver" runat="server" CssClass="btn btn-primary m-t-25" disabled="disabled" Text="Submit" OnClientClick="return CheckMasterFormValidation()" />--%>
<asp:Button ID="upload" runat="server" CssClass="btn btn-primary m-t-25" Text="Upload" OnClientClick="return ValidateRequiredfields()" OnClick="upload_Click" />
<input type="button" value="Upload" id="upload" class="btn btn-primary m-t-25" onclick="return ValidateRequiredfields()" />
</div>
</div>
</div>

121
JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx.cs

@ -3,6 +3,7 @@ using Business.Customer;
using Common.Helper;
using Common.Model.CustomerModel;
using Common.Utility;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
@ -18,71 +19,91 @@ namespace JMEAgentSystem.WebPages.AddIdPicture
private readonly ICustomerServices _customerServices = AutoFacContainer.Resolve<ICustomerServices>();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void upload_Click(object sender, EventArgs e)
{
try
if (!IsPostBack)
{
//checked file extention
HttpFileCollection fileCollectionNew = Request.Files;
string documentExtension = GetStatic.ReadWebConfig("customerDocFileExtension", "");
for (int i = 0; i < fileCollectionNew.AllKeys.Length; i++)
string reqMethod = Request.Form["MethodName"];
switch (reqMethod)
{
HttpPostedFile file = fileCollectionNew[i];
string fileExtension = new FileInfo(file.FileName).Extension;
if (!documentExtension.ToLower().Contains(fileExtension.ToLower()))
{
GetStatic.AlertMessage(this, "Invalid File Extenstion");
return;
}
case "SavePhotoFromAjaxCall":
SavePhotoFromAjaxCall();
break;
}
}
}
private void SavePhotoFromAjaxCall()
{
var jsonString = "";
var dbResult = new DbResult();
HttpFileCollection fileCollectionNew = HttpContext.Current.Request.Files;
string documentExtension = GetStatic.ReadWebConfig("customerDocFileExtension", "");
DbResult response = saveCustomerDocument();
GetStatic.AlertMessage(this.Page, response.Msg);
}
catch (Exception ex)
for (int i = 0; i < fileCollectionNew.AllKeys.Length; i++)
{
GetStatic.AlertMessage(this.Page, ex.Message);
HttpPostedFile file = fileCollectionNew[i];
string fileExtension = new FileInfo(file.FileName).Extension;
if (!documentExtension.ToLower().Contains(fileExtension.ToLower()))
{
dbResult.ErrorCode = "1";
dbResult.Msg = "Invalid File Extension";
jsonString = JsonConvert.SerializeObject(dbResult);
Response.ContentType = "application/json";
Response.Write(jsonString);
Response.End();
}
}
DbResult response = saveCustomerDocument();
jsonString = JsonConvert.SerializeObject(response);
Response.ContentType = "application/json";
Response.Write(jsonString);
Response.End();
}
private DbResult saveCustomerDocument()
{
HttpFileCollection fileCollection = Request.Files;
DbResult res = new DbResult();
for (int i = 0; i < fileCollection.AllKeys.Length; i++)
try
{
HttpPostedFile file = fileCollection[i];
if (file != null)
HttpFileCollection fileCollection = Request.Files;
DbResult res = new DbResult();
for (int i = 0; i < fileCollection.AllKeys.Length; i++)
{
string documentTypeName = "";
string documentType = "";
string fileType = "";
if (i == 0)
HttpPostedFile file = fileCollection[i];
if (file != null)
{
documentTypeName = "Alien Registration Card(Front)";
documentType = "11054";
string documentTypeName = "";
string documentType = "";
string fileType = "";
if (i == 0)
{
documentTypeName = "Alien Registration Card(Front)";
documentType = "11054";
}
else
{
documentTypeName = "Alien Registration Card(Back)";
documentType = "11055";
}
string fileName = (!string.IsNullOrWhiteSpace(file.FileName) ? UploadDocument(file, GetStatic.GetUser(), documentTypeName, out fileType) : UploadDocument(file, GetStatic.GetUser(), documentTypeName, out fileType));
CustomerDocument cm = new CustomerDocument();
cm.customerId = "";
cm.fileDescription = "";
cm.documentType = documentType;
cm.fileUrl = fileName;
cm.fileType = fileType;
res = _customerServices.UpdateCustomerDocument("", "0", fileName, documentType, "image/png", documentType, GetStatic.GetUser());
}
else
{
documentTypeName = "Alien Registration Card(Back)";
documentType = "11055";
}
string fileName = (!string.IsNullOrWhiteSpace(file.FileName) ? UploadDocument(file, GetStatic.GetUser(), documentTypeName, out fileType) : UploadDocument(file, GetStatic.GetUser(), documentTypeName, out fileType));
CustomerDocument cm = new CustomerDocument();
cm.customerId = "";
cm.fileDescription = "";
cm.documentType = documentType;
cm.fileUrl = fileName;
cm.fileType = fileType;
res = _customerServices.UpdateCustomerDocument("", "0", fileName, documentType, "image/png", documentType, GetStatic.GetUser());
}
return res;
}
catch (Exception ex)
{
return new DbResult() { ErrorCode = "1", Msg = ex.InnerException.ToString() };
}
return res;
}
private string UploadDocument(HttpPostedFile doc, string user, string documentTypeName, out string fileType)
{
@ -114,5 +135,7 @@ namespace JMEAgentSystem.WebPages.AddIdPicture
}
return fName;
}
}
}

9
JMEAgentSystem/WebPages/AddIdPicture/Manage.aspx.designer.cs

@ -47,14 +47,5 @@ namespace JMEAgentSystem.WebPages.AddIdPicture {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.FileUpload reg_back_id;
/// <summary>
/// upload 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 upload;
}
}

2
JMEAgentSystem/WebPages/BenificiaryRegistration/Manage.aspx

@ -369,7 +369,7 @@
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@1.5.4/src/loadingoverlay.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@1.5.4/extras/loadingoverlay_progress/loadingoverlay_progress.min.js"></script>
<script src="../../Scripts/Receiver/ReceiverRegistrationNew.js"></script>
<script src="../../Scripts/Receiver/ReceiverRegistrationNew.js?v=1.1"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#" + mId + "regUp").hide();

3
JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx

@ -604,7 +604,8 @@
<div class="row" runat="server">
<div class="col-md-6 form-group">
<%--<asp:Button ID="registerCustomerAndReceiver" runat="server" CssClass="btn btn-primary m-t-25" disabled="disabled" Text="Submit" OnClientClick="return CheckMasterFormValidation()" />--%>
<asp:Button ID="registerCustomerAndReceiver" runat="server" CssClass="btn btn-primary m-t-25" disabled="disabled" Text="Submit" OnClientClick="return CheckMasterFormValidation()" OnClick="registerCustomerAndReceiver_Click" />
<%--<asp:Button ID="registerCustomerAndReceiver" runat="server" CssClass="btn btn-primary m-t-25" disabled="disabled" Text="Submit" OnClientClick="return CheckMasterFormValidation()" OnClick="registerCustomerAndReceiver_Click" />--%>
<input type="button" id="registerCustomerAndReceiver" value="Register" class="btn btn-primary m-t-25" disabled="disabled" onclick="return CheckMasterFormValidation()" />
</div>
</div>
</div>

194
JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx.cs

@ -73,16 +73,13 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration
case "GetBankBranch":
GetBankBranch();
break;
case "":
SaveCustomerDetails();
case "SaveCustomerAndReceiver":
SaveCustomerAndReceiver();
break;
}
}
}
private void SaveCustomerDetails()
{
var paymentmode = Request.Form["paymentmode"];
}
private void PopulateDdl()
{
//customerDdl
@ -300,7 +297,7 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration
return;
}
}
if (hddTxnsMade.Value == "Y" && (!email.Text.Equals(hddOldEmailValue.Value.ToString())))
{
GetStatic.AlertMessage(this, "You can not change the email of customer who have already done transaction!");
@ -311,12 +308,13 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration
// GetStatic.AlertMessage(this, "Customer signature or customer password is required!");
// return;
//}
OnlineCustomerModel customerModel = PrepareCutomerData();
BenificiaryModel benificiaryModel = PrepareBenificiaryData();
var dbResult = _customerServices.RegisterCustomerAndReceiver(customerModel, benificiaryModel);
if (dbResult.ErrorCode == "0" && !string.IsNullOrEmpty(hddImgURL.Value) && !string.IsNullOrWhiteSpace(hddImgURL.Value))
{
var result = dbResult.Id.Split('|');
@ -504,6 +502,7 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration
return benificiar;
}
public static class Mapper
{
public static IList<T> DataTableToClass<T>(DataTable Table) where T : class, new()
@ -625,5 +624,182 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration
}
return fName;
}
public void SaveCustomerAndReceiver()
{
try
{
var jsonString = "";
//checked file extention
HttpFileCollection fileCollectionNew = Request.Files;
string documentExtension = GetStatic.ReadWebConfig("customerDocFileExtension", "");
for (int i = 0; i < fileCollectionNew.AllKeys.Length; i++)
{
HttpPostedFile file = fileCollectionNew[i];
string fileExtension = new FileInfo(file.FileName).Extension;
if (!documentExtension.ToLower().Contains(fileExtension.ToLower()))
{
DbResult response = new DbResult()
{
ErrorCode = "1",
Msg = "Invalid File Extension!!"
};
jsonString = JsonConvert.SerializeObject(response);
Response.ContentType = "application/json";
Response.Write(jsonString);
Response.End();
}
}
if (hddTxnsMade.Value == "Y" && (!email.Text.Equals(hddOldEmailValue.Value.ToString())))
{
GetStatic.AlertMessage(this, "You can not change the email of customer who have already done transaction!");
return;
}
//if (_sl.HasRight(SignatureFunctionId) && !isEdit && (string.IsNullOrEmpty(customerPassword.Text) || string.IsNullOrWhiteSpace(customerPassword.Text)) && (string.IsNullOrEmpty(hddImgURL.Value) || string.IsNullOrWhiteSpace(hddImgURL.Value)))
//{
// GetStatic.AlertMessage(this, "Customer signature or customer password is required!");
// return;
//}
OnlineCustomerModel customerModel = PrepareCutomerDataFromAjax();
BenificiaryModel benificiaryModel = PrepareBenificiaryDataFromAjax();
var dbResult = _customerServices.RegisterCustomerAndReceiver(customerModel, benificiaryModel);
var hddImgURL = Request.Form["hddImgURL"].ToString();
if (dbResult.ErrorCode == "0" && !string.IsNullOrEmpty(hddImgURL) && !string.IsNullOrWhiteSpace(hddImgURL))
{
var result = dbResult.Id.Split('|');
var customerId = result[0];
var membershipId = result[1];
var registerDate = result[2];
string signatureName = GetStatic.UploadSignatureImage(hddImgURL, registerDate, membershipId, customerId);
if (signatureName != "1")
{
_customerServices.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName, "agent-upload", customerId);
}
}
GetStatic.SetMessage(dbResult.ErrorCode, dbResult.Msg);
if (dbResult.ErrorCode == "0")
{
saveCustomerDocument(dbResult);
jsonString = JsonConvert.SerializeObject(dbResult);
Response.ContentType = "application/json";
Response.Write(jsonString);
Response.End();
}
}
catch (Exception ex)
{
DbResult dbResult = new DbResult()
{
ErrorCode = "1",
Msg = ex.InnerException.ToString()
};
var jsonString = JsonConvert.SerializeObject(dbResult);
Response.ContentType = "application/json";
Response.Write(jsonString);
Response.End();
}
}
public OnlineCustomerModel PrepareCutomerDataFromAjax()
{
string fname = Request.Form["firstName"].ToString();
string mName = Request.Form["middleName"].ToString();
string lName = Request.Form["lastName"].ToString();
string trimmedfirstName = fname.Trim() == "" ? null : fname.Trim();
string trimmedMiddleName = mName.Trim() == "" ? null : mName.Trim();
string trimmedlastName = lName.Trim() == "" ? null : lName.Trim();
OnlineCustomerModel customerModel = new OnlineCustomerModel();
customerModel.flag = "register-customer-and-receiver";
customerModel.firstName = trimmedfirstName;
customerModel.middleName = trimmedMiddleName;
customerModel.lastName1 = trimmedlastName;
customerModel.gender = Request.Form["genderList"].ToString();
customerModel.country = Request.Form["countryList"].ToString();
customerModel.zipCode = Request.Form["zipCode"].ToString();
customerModel.state = Request.Form["state"].ToString();
customerModel.city = Request.Form["city"].ToString();
customerModel.street = Request.Form["street"].ToString();
customerModel.AdditionalAddress = Request.Form["txtAdditionalAddress"].ToString();
customerModel.email = Request.Form["email"].ToString();
customerModel.homePhone = Request.Form["phoneNumber"].ToString();
customerModel.mobile = Request.Form["mobile"].ToString();
customerModel.visaStatus = Request.Form["ddlVisaStatus"].ToString();
customerModel.employeeBusinessType = Request.Form["ddlEmployeeBusType"].ToString();
customerModel.nativeCountry = Request.Form["nativeCountry"].ToString();
customerModel.dob = Request.Form["dob"].ToString();
//customerModel.dob = "1995-05-02";
customerModel.sourceOfFound = Request.Form["ddSourceOfFound"].ToString();
customerModel.occupation = Request.Form["occupation"].ToString();
customerModel.telNo = Request.Form["phoneNumber"].ToString();
customerModel.ipAddress = GetStatic.GetIp();
customerModel.createdBy = GetStatic.GetUser();
//customerModel.createdBy = GetStatic.GetUser();
customerModel.idNumber = Request.Form["verificationTypeNo"].ToString();
customerModel.idIssueDate = Request.Form["IssueDate"].ToString();
customerModel.idExpiryDate = Request.Form["ExpireDate"].ToString();
//customerModel.idIssueDate = "2020-01-02";
//customerModel.idExpiryDate = "2021-05-02";
customerModel.idType = Request.Form["idType"].ToString();
customerModel.remitanceAllowed = Request.Form["rbRemitanceAllowed"].ToString() == "Enabled" ? true : false;
customerModel.onlineUser = Request.Form["rbOnlineLogin"].ToString() == "Enabled" ? true : false;
customerModel.remarks = Request.Form["txtRemarks"].ToString();
customerModel.nameofEmployeer = Request.Form["txtNameofEmployeer"].ToString();
customerModel.MonthlyIncome = Request.Form["ddlSalary"].ToString();
//customerModel.agentId = Int32.Parse(GetStatic.GetAgent());
customerModel.DocumentType = Request.Form["ddlDocType"].ToString();
customerModel.occupationOther = Request.Form["occupationText"].ToString();
return customerModel;
}
public BenificiaryModel PrepareBenificiaryDataFromAjax()
{
string receiverId = GetStatic.ReadQueryString("receiverId", "");
var rfName = Request.Form["recTxtReceiverFName"].ToString();
var rMName = Request.Form["recTxtReceiverMName"].ToString();
var rLName = Request.Form["recTxtReceiverLName"].ToString();
var trimmedReceiverFName = rfName.ToString().ToUpper().Trim() == "" ? null : rfName.ToString().ToUpper().Trim();
var trimmedReceiverMName = rMName.ToString().ToUpper().Trim() == "" ? null : rMName.ToString().ToUpper().Trim();
var trimmedReceiverLName = rLName.ToString().ToUpper().Trim() == "" ? null : rLName.ToString().ToUpper().Trim();
BenificiaryModel benificiar = new BenificiaryModel();
string Country = Request.Form["recDdlCountry"].ToString();
benificiar.Country = Request.Form["recDdlCountry"].ToString();
benificiar.NativeCountry = Request.Form["recDdlNativeCountry"].ToString();
benificiar.BenificiaryType = Request.Form["recDdlBenificiaryType"].ToString();
benificiar.Email = Request.Form["recTxtEmail"].ToString();
benificiar.ReceiverFName = trimmedReceiverFName;
benificiar.ReceiverMName = trimmedReceiverMName;
benificiar.ReceiverLName = trimmedReceiverLName;
benificiar.ReceiverAddress = Request.Form["recTxtReceiverAddress"].ToString();
benificiar.ReceiverCity = Request.Form["recTxtReceiverCity"].ToString();
benificiar.ContactNo = Request.Form["recTxtContactNo"].ToString();
benificiar.SenderMobileNo = Request.Form["recTxtRecMobileNo"].ToString();
benificiar.Relationship = Request.Form["recDdlRelationship"].ToString();
benificiar.PlaceOfIssue = Request.Form["recTxtPlaceOfIssue"].ToString();
benificiar.TypeId = Request.Form["recDdlIdType"].ToString();
benificiar.TypeValue = Request.Form["recTxtIdValue"].ToString();
benificiar.PurposeOfRemitance = Request.Form["recDdlPurposeOfRemitance"].ToString();
benificiar.OtherPurpose = Request.Form["purposeOther"].ToString();
benificiar.PaymentMode = Request.Form["recDdlPaymentMode"].ToString();
benificiar.PayoutPatner = Request.Form["recDdlPayoutPatner"].ToString();
benificiar.BenificaryAc = Request.Form["recTxtBenificaryAc"].ToString();
benificiar.BankLocation = Request.Form["recDDLBankBranch"].ToString();
benificiar.Remarks = Request.Form["recTxtRemarksRec"].ToString();
benificiar.OtherRelationDescription = Request.Form["recOtherRelationshipTextBox"].ToString();
benificiar.branchText = Request.Form["branch_manual"].ToString();
return benificiar;
}
}
}
}

9
JMEAgentSystem/WebPages/CustomerRegistration/Manage.aspx.designer.cs

@ -705,15 +705,6 @@ namespace JMEAgentSystem.WebPages.CustomerRegistration {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox customerPassword;
/// <summary>
/// registerCustomerAndReceiver 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 registerCustomerAndReceiver;
/// <summary>
/// hdnVerifyDoc1 control.
/// </summary>

2
JMEAgentSystem/WebPages/CustomerRegistration/PrintDetails.aspx

@ -60,7 +60,7 @@
<td class="tg-fymr">Occupation :</td>
<td colspan="3" class="tg-0pky" runat="server" id="txtOccupation"></td>
<td class="tg-fymr">Other Relation Desc:</td>
<td class="tg-fymr">Other Occupation:</td>
<td colspan="1" class="tg-0pky" runat="server" id="txtOtherOccupation"></td>
</tr>
<tr>

1
JMEAgentSystem/WebPages/GetFileView.ashx.cs

@ -30,7 +30,6 @@ namespace JMEAgentSystem.WebPages
DateTime txnDate = Convert.ToDateTime(registerDate);
//imgPath = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipNo + "\\" + fileName;
imgPath = Path.Combine(GetStatic.GetCustomerFilePath(), "CustomerDocument", registerDate.Replace("-", "/"), membershipNo, fileName);
if (File.Exists(imgPath))
{
context.Response.ContentType = imgPath;

188
Repository/Repository/OnlineCustomerDao/CustomerRepository.cs

@ -156,98 +156,110 @@ namespace Repository.Repository.OnlineCustomerDao
public DbResult RegisterCustomerAndReceiver(OnlineCustomerModel onlineCustomerModel, BenificiaryModel beniciaryModel)
{
var sql = "EXEC proc_jme_agent_system_customer";
sql += " @Flag =" + FilterString(onlineCustomerModel.flag);
sql += " ,@customerId =" + FilterString(onlineCustomerModel.customerId);
sql += ",@user = " + FilterString(onlineCustomerModel.createdBy);
sql += ",@customerType = " + FilterString(onlineCustomerModel.customerType);
if (onlineCustomerModel.companyName != null && onlineCustomerModel.companyName != "")
{
sql += ",@firstName=" + FilterString(onlineCustomerModel.companyName);
}
else
try
{
sql += ",@firstName=" + FilterString(onlineCustomerModel.firstName);
}
sql += ",@middleName=" + FilterString(onlineCustomerModel.middleName);
sql += ",@lastName1=" + FilterString(onlineCustomerModel.lastName1);
sql += ",@custEmail=" + FilterString(onlineCustomerModel.email);
sql += ",@custDOB=" + FilterString(onlineCustomerModel.dob);
sql += ",@custAdd1=" + FilterString(onlineCustomerModel.address);
sql += ",@occupation=" + FilterString(onlineCustomerModel.occupation);
sql += ",@custCity=" + FilterString(onlineCustomerModel.city);
sql += ",@cityUnicode=" + FilterStringUnicode(onlineCustomerModel.senderCityjapan);
sql += ",@streetUnicode=" + FilterStringUnicode(onlineCustomerModel.streetJapanese);
sql += ",@custPostal=" + FilterString(onlineCustomerModel.postalCode);
sql += ",@street=" + FilterString(onlineCustomerModel.street);
sql += ",@state=" + FilterString(onlineCustomerModel.state);
sql += ",@visaStatus=" + FilterString(onlineCustomerModel.visaStatus);
sql += ",@employeeBusinessType=" + FilterString(onlineCustomerModel.employeeBusinessType);
sql += ",@nameofEmployeer=" + FilterString(onlineCustomerModel.nameofEmployeer);
sql += ",@SSNNO=" + FilterString(onlineCustomerModel.ssnNo);
sql += ",@zipCode=" + FilterString(onlineCustomerModel.zipCode);
sql += ",@sourceOfFound=" + FilterString(onlineCustomerModel.sourceOfFound);
sql += ",@remittanceAllowed=" + onlineCustomerModel.remitanceAllowed;
sql += ",@onlineUser=" + onlineCustomerModel.onlineUser;
sql += ",@remarks=" + FilterString(onlineCustomerModel.remarks);
sql += ",@country=" + FilterString(onlineCustomerModel.country);
sql += ",@custNativecountry=" + FilterString(onlineCustomerModel.nativeCountry.ToString());
sql += ",@customerIdType=" + FilterString(onlineCustomerModel.idType);
sql += ",@customerIdNo=" + FilterString(onlineCustomerModel.idNumber);
sql += ",@custIdissueDate=" + FilterString(onlineCustomerModel.idIssueDate);
sql += ",@custIdValidDate=" + FilterString(onlineCustomerModel.idExpiryDate);
sql += ",@custMobile=" + FilterString(onlineCustomerModel.mobile);
sql += ",@custTelNo=" + FilterString(onlineCustomerModel.telNo);
sql += ",@ipAddress=" + FilterString(onlineCustomerModel.ipAddress);
sql += ",@createdBy=" + FilterString(onlineCustomerModel.createdBy);
sql += ",@custGender=" + FilterString(onlineCustomerModel.gender);
sql += ",@bankId=" + FilterString(onlineCustomerModel.bankId);
sql += ",@accountNumber=" + FilterString(onlineCustomerModel.accountNumber);
sql += ",@nameOfAuthorizedPerson=" + FilterString(onlineCustomerModel.nameofAuthoPerson);
sql += ",@registerationNo=" + FilterString(onlineCustomerModel.registrationNo);
sql += ",@organizationType=" + FilterString(onlineCustomerModel.organizationType);
sql += ",@dateOfIncorporation=" + FilterString(onlineCustomerModel.dateOfIncorporation);
sql += ",@natureOfCompany=" + FilterString(onlineCustomerModel.natureOfCompany);
sql += ",@position=" + FilterString(onlineCustomerModel.position);
sql += ",@membershipId=" + FilterString(onlineCustomerModel.membershipId);
sql += ",@companyName=" + FilterString(onlineCustomerModel.companyName);
sql += ",@monthlyIncome=" + FilterString(onlineCustomerModel.MonthlyIncome);
sql += ",@isCounterVisited=" + FilterString(onlineCustomerModel.IsCounterVisited);
sql += ",@newPassword=" + FilterString(onlineCustomerModel.customerPassword);
sql += ",@additionalAddress=" + FilterString(onlineCustomerModel.AdditionalAddress);
sql += ",@loginBranchId=" + FilterString(onlineCustomerModel.agentId.ToString());
sql += ",@docType=" + FilterString(onlineCustomerModel.DocumentType);
sql += ",@otherOccupationText =" + FilterString(onlineCustomerModel.occupationOther);
var sql = "EXEC proc_jme_agent_system_customer";
sql += " @Flag =" + FilterString(onlineCustomerModel.flag);
sql += " ,@customerId =" + FilterString(onlineCustomerModel.customerId);
sql += ",@user = " + FilterString(onlineCustomerModel.createdBy);
sql += ",@customerType = " + FilterString(onlineCustomerModel.customerType);
if (onlineCustomerModel.companyName != null && onlineCustomerModel.companyName != "")
{
sql += ",@firstName=" + FilterString(onlineCustomerModel.companyName);
}
else
{
sql += ",@firstName=" + FilterString(onlineCustomerModel.firstName);
}
sql += ",@middleName=" + FilterString(onlineCustomerModel.middleName);
sql += ",@lastName1=" + FilterString(onlineCustomerModel.lastName1);
sql += ",@custEmail=" + FilterString(onlineCustomerModel.email);
sql += ",@custDOB=" + FilterString(onlineCustomerModel.dob);
sql += ",@custAdd1=" + FilterString(onlineCustomerModel.address);
sql += ",@occupation=" + FilterString(onlineCustomerModel.occupation);
sql += ",@custCity=" + FilterString(onlineCustomerModel.city);
sql += ",@cityUnicode=" + FilterStringUnicode(onlineCustomerModel.senderCityjapan);
sql += ",@streetUnicode=" + FilterStringUnicode(onlineCustomerModel.streetJapanese);
sql += ",@custPostal=" + FilterString(onlineCustomerModel.postalCode);
sql += ",@street=" + FilterString(onlineCustomerModel.street);
sql += ",@state=" + FilterString(onlineCustomerModel.state);
sql += ",@visaStatus=" + FilterString(onlineCustomerModel.visaStatus);
sql += ",@employeeBusinessType=" + FilterString(onlineCustomerModel.employeeBusinessType);
sql += ",@nameofEmployeer=" + FilterString(onlineCustomerModel.nameofEmployeer);
sql += ",@SSNNO=" + FilterString(onlineCustomerModel.ssnNo);
sql += ",@zipCode=" + FilterString(onlineCustomerModel.zipCode);
sql += ",@sourceOfFound=" + FilterString(onlineCustomerModel.sourceOfFound);
sql += ",@remittanceAllowed=" + onlineCustomerModel.remitanceAllowed;
sql += ",@onlineUser=" + onlineCustomerModel.onlineUser;
sql += ",@remarks=" + FilterString(onlineCustomerModel.remarks);
sql += ",@country=" + FilterString(onlineCustomerModel.country);
sql += ",@custNativecountry=" + FilterString(onlineCustomerModel.nativeCountry.ToString());
sql += ",@customerIdType=" + FilterString(onlineCustomerModel.idType);
sql += ",@customerIdNo=" + FilterString(onlineCustomerModel.idNumber);
sql += ",@custIdissueDate=" + FilterString(onlineCustomerModel.idIssueDate);
sql += ",@custIdValidDate=" + FilterString(onlineCustomerModel.idExpiryDate);
sql += ",@custMobile=" + FilterString(onlineCustomerModel.mobile);
sql += ",@custTelNo=" + FilterString(onlineCustomerModel.telNo);
sql += ",@ipAddress=" + FilterString(onlineCustomerModel.ipAddress);
sql += ",@createdBy=" + FilterString(onlineCustomerModel.createdBy);
sql += ",@custGender=" + FilterString(onlineCustomerModel.gender);
sql += ",@bankId=" + FilterString(onlineCustomerModel.bankId);
sql += ",@accountNumber=" + FilterString(onlineCustomerModel.accountNumber);
sql += ",@nameOfAuthorizedPerson=" + FilterString(onlineCustomerModel.nameofAuthoPerson);
sql += ",@registerationNo=" + FilterString(onlineCustomerModel.registrationNo);
sql += ",@organizationType=" + FilterString(onlineCustomerModel.organizationType);
sql += ",@dateOfIncorporation=" + FilterString(onlineCustomerModel.dateOfIncorporation);
sql += ",@natureOfCompany=" + FilterString(onlineCustomerModel.natureOfCompany);
sql += ",@position=" + FilterString(onlineCustomerModel.position);
sql += ",@membershipId=" + FilterString(onlineCustomerModel.membershipId);
sql += ",@companyName=" + FilterString(onlineCustomerModel.companyName);
sql += ",@monthlyIncome=" + FilterString(onlineCustomerModel.MonthlyIncome);
sql += ",@isCounterVisited=" + FilterString(onlineCustomerModel.IsCounterVisited);
sql += ",@newPassword=" + FilterString(onlineCustomerModel.customerPassword);
sql += ",@additionalAddress=" + FilterString(onlineCustomerModel.AdditionalAddress);
sql += ",@loginBranchId=" + FilterString(onlineCustomerModel.agentId.ToString());
sql += ",@docType=" + FilterString(onlineCustomerModel.DocumentType);
sql += ",@otherOccupationText =" + FilterString(onlineCustomerModel.occupationOther);
sql += ",@recCountry =" + FilterString(beniciaryModel.Country);
sql += ",@recNativeCountry =" + FilterString(beniciaryModel.NativeCountry);
sql += ",@recReceiverType =" + FilterString(beniciaryModel.BenificiaryType);
sql += ",@recEmail =" + FilterString(beniciaryModel.Email);
sql += ",@recFirstName =" + FilterString(beniciaryModel.ReceiverFName);
sql += ",@recMiddleName =" + FilterString(beniciaryModel.ReceiverMName);
sql += ",@recLastName1 =" + FilterString(beniciaryModel.ReceiverLName);
sql += ",@recLastName2 =" + FilterString(beniciaryModel.ReceiverLName2);
sql += ",@recAddress =" + FilterString(beniciaryModel.ReceiverAddress);
sql += ",@recCity =" + FilterString(beniciaryModel.ReceiverCity);
sql += ",@recHomePhone =" + FilterString(beniciaryModel.ContactNo);
sql += ",@recMobile =" + FilterString(beniciaryModel.SenderMobileNo);
sql += ",@recRelationship =" + FilterString(beniciaryModel.Relationship);
sql += ",@recPlaceOfIssue =" + FilterString(beniciaryModel.PlaceOfIssue);
sql += ",@recIdType =" + FilterString(beniciaryModel.TypeId);
sql += ",@recIdNumber =" + FilterString(beniciaryModel.TypeValue);
sql += ",@recPurposeOfRemit =" + FilterString(beniciaryModel.PurposeOfRemitance);
sql += ",@purposeOfRemitanceOther =" + FilterString(beniciaryModel.OtherPurpose);
sql += ",@recPaymentMode =" + FilterString(beniciaryModel.PaymentMode);
sql += ",@recPayOutPartner =" + FilterString(beniciaryModel.PayoutPatner);
sql += ",@recBankLocation =" + FilterString(beniciaryModel.BankLocation);
sql += ",@recBankName =" + FilterString(beniciaryModel.BankName);
sql += ",@recReceiverAccountNo =" + FilterString(beniciaryModel.BenificaryAc);
sql += ",@recRemarks =" + FilterString(beniciaryModel.Remarks);
sql += ",@recOtherRelationDesc =" + FilterString(beniciaryModel.OtherRelationDescription);
sql += ",@branchManual=" + FilterString(beniciaryModel.branchText);
sql += ",@recCountry =" + FilterString(beniciaryModel.Country);
sql += ",@recNativeCountry =" + FilterString(beniciaryModel.NativeCountry);
sql += ",@recReceiverType =" + FilterString(beniciaryModel.BenificiaryType);
sql += ",@recEmail =" + FilterString(beniciaryModel.Email);
sql += ",@recFirstName =" + FilterString(beniciaryModel.ReceiverFName);
sql += ",@recMiddleName =" + FilterString(beniciaryModel.ReceiverMName);
sql += ",@recLastName1 =" + FilterString(beniciaryModel.ReceiverLName);
sql += ",@recLastName2 =" + FilterString(beniciaryModel.ReceiverLName2);
sql += ",@recAddress =" + FilterString(beniciaryModel.ReceiverAddress);
sql += ",@recCity =" + FilterString(beniciaryModel.ReceiverCity);
sql += ",@recHomePhone =" + FilterString(beniciaryModel.ContactNo);
sql += ",@recMobile =" + FilterString(beniciaryModel.SenderMobileNo);
sql += ",@recRelationship =" + FilterString(beniciaryModel.Relationship);
sql += ",@recPlaceOfIssue =" + FilterString(beniciaryModel.PlaceOfIssue);
sql += ",@recIdType =" + FilterString(beniciaryModel.TypeId);
sql += ",@recIdNumber =" + FilterString(beniciaryModel.TypeValue);
sql += ",@recPurposeOfRemit =" + FilterString(beniciaryModel.PurposeOfRemitance);
sql += ",@purposeOfRemitanceOther =" + FilterString(beniciaryModel.OtherPurpose);
sql += ",@recPaymentMode =" + FilterString(beniciaryModel.PaymentMode);
sql += ",@recPayOutPartner =" + FilterString(beniciaryModel.PayoutPatner);
sql += ",@recBankLocation =" + FilterString(beniciaryModel.BankLocation);
sql += ",@recBankName =" + FilterString(beniciaryModel.BankName);
sql += ",@recReceiverAccountNo =" + FilterString(beniciaryModel.BenificaryAc);
sql += ",@recRemarks =" + FilterString(beniciaryModel.Remarks);
sql += ",@recOtherRelationDesc =" + FilterString(beniciaryModel.OtherRelationDescription);
sql += ",@branchManual=" + FilterString(beniciaryModel.branchText);
return ParseDbResult(sql);
return ParseDbResult(sql);
}
catch (Exception ex)
{
return new DbResult()
{
ErrorCode = "1",
Msg = ex.InnerException.ToString()
};
}
}
public DbResult UpdateCustomerDocument(string cdId, string customerId, string fileName, string fileDescription, string fileType, string documentType, string user)

Loading…
Cancel
Save