@ -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 + "occupation" ) . prop ( "disabled" , true ) ;
$ ( "#" + mId + "recReceiverAccountNo" ) . hide ( ) ;
$ ( "#" + mId + "recReceiverAccountNo" ) . hide ( ) ;
$ ( "#" + mId + "agentBankBranchDiv" ) . hide ( ) ;
$ ( "#" + mId + "agentBankBranchDiv" ) . hide ( ) ;
//PopulateCustomerData();
//PopulateBenifiairyData();
PopulateCustomerData ( ) ;
PopulateBenifiairyData ( ) ;
$ ( "#" + mId + "ExpireDate" ) . click ( function ( ) {
$ ( "#" + mId + "ExpireDate" ) . click ( function ( ) {
$ ( "#" + mId + "ExpireDate" ) . val ( "" ) ;
$ ( "#" + mId + "ExpireDate" ) . val ( "" ) ;
@ -20,7 +28,6 @@
$ ( "#" + mId + "recTxtIdValue" ) . val ( "" ) ;
$ ( "#" + mId + "recTxtIdValue" ) . val ( "" ) ;
} )
} )
$ ( "#MainContent_recDdlPaymentMode,#MainContent_recDdlPayoutPatner" ) . on ( "change" , function ( ) {
$ ( "#MainContent_recDdlPaymentMode,#MainContent_recDdlPayoutPatner" ) . on ( "change" , function ( ) {
debugger
let pmode = $ ( "#" + mId + "recDdlPaymentMode" ) . val ( ) ;
let pmode = $ ( "#" + mId + "recDdlPaymentMode" ) . val ( ) ;
if ( pmode == "2" ) {
if ( pmode == "2" ) {
$ ( "#" + mId + "recReceiverAccountNo" ) . show ( ) ;
$ ( "#" + mId + "recReceiverAccountNo" ) . show ( ) ;
@ -84,17 +91,6 @@
txtSearchData . InitFunction ( ) ;
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
//mobile country code added
$ ( "#" + mId + "mobile" ) . intlTelInput ( {
$ ( "#" + mId + "mobile" ) . intlTelInput ( {
@ -104,7 +100,6 @@
} ) ;
} ) ;
$ ( "#" + mId + "mobile" ) . on ( "change" , function ( ) {
$ ( "#" + mId + "mobile" ) . on ( "change" , function ( ) {
debugger
var input = $ ( "#" + mId + "mobile" ) ;
var input = $ ( "#" + mId + "mobile" ) ;
var countryCode = $ ( ".customer .dial-code" ) . text ( ) ;
var countryCode = $ ( ".customer .dial-code" ) . text ( ) ;
var mobileNo = input . val ( ) ;
var mobileNo = input . val ( ) ;
@ -144,16 +139,16 @@
//, "#CustomerAgreement", "#BenificiaryAgreement", "#TransactionAgreement"
//, "#CustomerAgreement", "#BenificiaryAgreement", "#TransactionAgreement"
$ ( "#agreement,#MainContent_CustomerAgreement" ) . click ( function ( ) {
$ ( "#agreement,#MainContent_CustomerAgreement" ) . click ( function ( ) {
if ( $ ( "#agreement" ) . is ( ":checked" ) && $ ( "#MainContent_CustomerAgreement" ) . is ( ":checked" ) ) {
if ( $ ( "#agreement" ) . is ( ":checked" ) && $ ( "#MainContent_CustomerAgreement" ) . is ( ":checked" ) ) {
$ ( "#" + mId + " registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
$ ( "#registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
} else {
} else {
$ ( "#" + mId + " registerCustomerAndReceiver" ) . attr ( "disabled" , "disabled" ) ;
$ ( "#registerCustomerAndReceiver" ) . attr ( "disabled" , "disabled" ) ;
}
}
} ) ;
} ) ;
$ ( "#btnIAgree" ) . on ( "click" , function ( ) {
$ ( "#btnIAgree" ) . on ( "click" , function ( ) {
$ ( "input[name=agreement]" ) . prop ( "checked" , true ) ;
$ ( "input[name=agreement]" ) . prop ( "checked" , true ) ;
if ( $ ( "#agreement" ) . is ( ":checked" ) && $ ( "#MainContent_CustomerAgreement" ) . is ( ":checked" ) ) {
if ( $ ( "#agreement" ) . is ( ":checked" ) && $ ( "#MainContent_CustomerAgreement" ) . is ( ":checked" ) ) {
$ ( "#" + mId + " registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
$ ( "#registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
}
}
} ) ;
} ) ;
CustomerSignature ( ) ;
CustomerSignature ( ) ;
@ -229,7 +224,7 @@ function CallBackAutocomplete(id) {
$ ( "#" + mId + "hdnCustomerId" ) . val ( d [ 0 ] ) ;
$ ( "#" + mId + "hdnCustomerId" ) . val ( d [ 0 ] ) ;
LoadcustomerData ( ) ;
LoadcustomerData ( ) ;
$ ( "#" + mId + "addEditPanel" ) . removeAttr ( "style" ) ;
$ ( "#" + mId + "addEditPanel" ) . removeAttr ( "style" ) ;
$ ( "#" + mId + " registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
$ ( "#registerCustomerAndReceiver" ) . removeAttr ( "disabled" ) ;
}
}
function LoadcustomerData ( ) {
function LoadcustomerData ( ) {
@ -336,17 +331,20 @@ function ParseCustomerData(response) {
}
}
function CheckMasterFormValidation ( ) {
function CheckMasterFormValidation ( ) {
debugger
var requiredFieldAllPresent = ValidateRequiredfields ( ) ;
var requiredFieldAllPresent = ValidateRequiredfields ( ) ;
if ( requiredFieldAllPresent ) {
if ( requiredFieldAllPresent ) {
return CheckSignatureCustomerFromCustomerRegister ( ) ;
var result = CheckSignatureCustomerFromCustomerRegister ( ) ;
if ( result ) {
RegisterCustomerAndReeiverFromAjaxCall ( ) ;
} else {
return result ;
}
} else {
} else {
return requiredFieldAllPresent ;
return requiredFieldAllPresent ;
}
}
}
}
function ValidateRequiredfields ( ) {
function ValidateRequiredfields ( ) {
if ( CheckRequiredFields ( ) == true && CheckCustomerValidation ( ) == true && CheckReceiverValidation ( ) == true && CheckDocumentFormat ( ) == true ) {
if ( CheckRequiredFields ( ) == true && CheckCustomerValidation ( ) == true && CheckReceiverValidation ( ) == true && CheckDocumentFormat ( ) == true ) {
//PrepareDataForAjaxCall();
var a = $ ( "#" + mId + "recDdlPaymentMode option:selected" ) . val ( ) ;
var a = $ ( "#" + mId + "recDdlPaymentMode option:selected" ) . val ( ) ;
var b = $ ( "#" + mId + "recDdlPayoutPatner option:selected" ) . val ( ) ;
var b = $ ( "#" + mId + "recDdlPayoutPatner option:selected" ) . val ( ) ;
var c = $ ( "#" + mId + "recDDLBankBranch option:selected" ) . val ( ) ;
var c = $ ( "#" + mId + "recDDLBankBranch option:selected" ) . val ( ) ;
@ -369,9 +367,8 @@ function CheckRequiredFields() {
if ( $ ( "#" + mId + "expiryDiv" ) . hasClass ( "hidden" ) ) {
if ( $ ( "#" + mId + "expiryDiv" ) . hasClass ( "hidden" ) ) {
reqField = reqField . replace ( ",ExpireDate," , "," ) ;
reqField = reqField . replace ( ",ExpireDate," , "," ) ;
}
}
//receiver required fields
//receiver required fields
reqField = reqField + "recDdlCountry,recTxtReceiverFName,recTxtReceiverLName,recDdlNativeCountry,recTxtReceiverAddress,recTxtRecMobileNo,rec DdlPaymentMode," ;
reqField = reqField + "recDdlCountry,recTxtReceiverFName,recTxtReceiverLName,recDdlNativeCountry,recTxtReceiverAddress,recDdlPaymentMode," ;
//let pmode = $("#" + mId + "recDdlPaymentMode").val();
//let pmode = $("#" + mId + "recDdlPaymentMode").val();
//if (pmode == "2") {
//if (pmode == "2") {
// reqField = reqField + "recDdlPayoutPatner,recTxtBenificaryAc,recDDLBankBranch,"
// reqField = reqField + "recDdlPayoutPatner,recTxtBenificaryAc,recDDLBankBranch,"
@ -384,7 +381,6 @@ function CheckRequiredFields() {
}
}
//document required
//document required
reqField = reqField + "reg_front_id,reg_back_id," ;
reqField = reqField + "reg_front_id,reg_back_id," ;
if ( ValidRequiredFieldWithDoc ( reqField ) === false ) {
if ( ValidRequiredFieldWithDoc ( reqField ) === false ) {
return false ;
return false ;
} else {
} else {
@ -394,8 +390,6 @@ function CheckRequiredFields() {
}
}
function CheckDocumentFormat ( ) {
function CheckDocumentFormat ( ) {
debugger
var frontImg = $ ( '#MainContent_reg_front_id' ) . val ( ) ;
var frontImg = $ ( '#MainContent_reg_front_id' ) . val ( ) ;
var backImg = $ ( '#MainContent_reg_back_id' ) . val ( ) ;
var backImg = $ ( '#MainContent_reg_back_id' ) . val ( ) ;
@ -493,59 +487,6 @@ function CheckReceiverValidation() {
return true ;
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 ) {
function loadImage ( filePath , id ) {
$ ( "#" + id ) . attr ( "src" , path ) ;
$ ( "#" + id ) . attr ( "src" , path ) ;
@ -609,7 +550,6 @@ function GetAddressByZipCode() {
var url = "" ;
var url = "" ;
$ . post ( url , dataToSend , function ( erd ) {
$ . post ( url , dataToSend , function ( erd ) {
if ( erd !== null ) {
if ( erd !== null ) {
debugger
var dr = jQuery . parseJSON ( erd ) ;
var dr = jQuery . parseJSON ( erd ) ;
if ( erd == false ) {
if ( erd == false ) {
$ ( "#" + mId + "ddlState" ) . val ( "" ) ;
$ ( "#" + mId + "ddlState" ) . val ( "" ) ;
@ -773,4 +713,210 @@ function PopulateBenifiairyData() {
$ ( "#" + mId + "recDdlPurposeOfRemitance" ) . val ( '11141' ) ;
$ ( "#" + mId + "recDdlPurposeOfRemitance" ) . val ( '11141' ) ;
$ ( "#" + mId + "recTxtRemarksRec" ) . val ( 'remarksrec' ) ;
$ ( "#" + mId + "recTxtRemarksRec" ) . val ( 'remarksrec' ) ;
$ ( "#" + mId + "recDdlNativeCountry" ) . val ( '16' ) ;
$ ( "#" + 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 ;
}
} ) ;
}
}