|
@ -128,89 +128,105 @@ namespace JMEAgentSystem.WebPages.BenificiaryRegistration |
|
|
|
|
|
|
|
|
private void SaveReceiverDetails() |
|
|
private void SaveReceiverDetails() |
|
|
{ |
|
|
{ |
|
|
var customerIdVal = Request.Form["customerId"].ToString(); |
|
|
|
|
|
if (customerIdVal == "") |
|
|
|
|
|
|
|
|
try |
|
|
{ |
|
|
{ |
|
|
DbResult Result = new DbResult() |
|
|
|
|
|
|
|
|
var customerIdVal = Request.Form["customerId"].ToString(); |
|
|
|
|
|
if (customerIdVal == "") |
|
|
{ |
|
|
{ |
|
|
ErrorCode = "1", |
|
|
|
|
|
Msg = "Please select cusotmer first" |
|
|
|
|
|
}; |
|
|
|
|
|
var jsonString2 = JsonConvert.SerializeObject(Result); |
|
|
|
|
|
Response.ContentType = "application/json"; |
|
|
|
|
|
Response.Write(jsonString2); |
|
|
|
|
|
Response.End(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
string receiverId = GetStatic.ReadQueryString("receiverId", ""); |
|
|
|
|
|
|
|
|
DbResult Result = new DbResult() |
|
|
|
|
|
{ |
|
|
|
|
|
ErrorCode = "1", |
|
|
|
|
|
Msg = "Please select cusotmer first" |
|
|
|
|
|
}; |
|
|
|
|
|
var jsonString2 = JsonConvert.SerializeObject(Result); |
|
|
|
|
|
Response.ContentType = "application/json"; |
|
|
|
|
|
Response.Write(jsonString2); |
|
|
|
|
|
Response.End(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var PaymentModeValue = Request.Form["paymentMode"].ToString(); |
|
|
|
|
|
var trimmedReceiverFName = Request.Form["ReceiverFName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverFName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
var trimmedReceiverMName = Request.Form["ReceiverMName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverMName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
var trimmedReceiverLName = Request.Form["ReceiverLName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverLName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
|
|
|
|
|
|
BenificiaryModel benificiar = new BenificiaryModel(); |
|
|
|
|
|
|
|
|
|
|
|
string Country = Request.Form["Country"].ToString(); |
|
|
|
|
|
benificiar.Country = Country.Split('(')[0]; |
|
|
|
|
|
benificiar.NativeCountry = Request.Form["nativeCountry"].ToString(); |
|
|
|
|
|
benificiar.BenificiaryType = Request.Form["BenificiaryType"].ToString(); |
|
|
|
|
|
benificiar.Email = Request.Form["Email"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ReceiverFName = trimmedReceiverFName; |
|
|
|
|
|
benificiar.ReceiverMName = trimmedReceiverMName; |
|
|
|
|
|
benificiar.ReceiverLName = trimmedReceiverLName; |
|
|
|
|
|
benificiar.ReceiverAddress = Request.Form["ReceiverAddress"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ReceiverCity = Request.Form["ReceiverCity"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ContactNo = Request.Form["ContactNo"].ToString(); |
|
|
|
|
|
benificiar.SenderMobileNo = Request.Form["SenderMobileNo"].ToString(); |
|
|
|
|
|
benificiar.Relationship = Request.Form["Relationship"].ToString(); |
|
|
|
|
|
benificiar.PlaceOfIssue = Request.Form["PlaceOfIssue"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.TypeId = Request.Form["TypeId"].ToString(); |
|
|
|
|
|
benificiar.TypeValue = Request.Form["TypeValue"].ToString(); |
|
|
|
|
|
benificiar.PurposeOfRemitance = Request.Form["PurposeOfRemitance"].ToString(); |
|
|
|
|
|
benificiar.OtherPurpose = Request.Form["OtherPrupose"].ToString(); |
|
|
|
|
|
benificiar.PaymentMode = Request.Form["PaymentMode"].ToString(); |
|
|
|
|
|
benificiar.PayoutPatner = Request.Form["PayoutPatner"].ToString(); |
|
|
|
|
|
benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString(); |
|
|
|
|
|
benificiar.BankLocation = Request.Form["BankLocation"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.BankName = Request.Form["BankName"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString(); |
|
|
|
|
|
benificiar.Remarks = Request.Form["Remarks"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.OtherRelationDescription = Request.Form["OtherRelationDescription"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.membershipId = Request.Form["membershipId"].ToString(); |
|
|
|
|
|
benificiar.ReceiverId = Request.Form["ReceiverId"].ToString(); |
|
|
|
|
|
//benificiar.customerId = (Request.Form["hideCustomerId"].ToString() != "" ? Request.Form["hideCustomerId"].ToString() : null);
|
|
|
|
|
|
benificiar.customerId = customerIdVal; |
|
|
|
|
|
benificiar.branchText = branch_manual.Text; |
|
|
|
|
|
//benificiar.agentId = GetStatic.GetAgent().ToInt();
|
|
|
|
|
|
|
|
|
|
|
|
benificiar.Flag = (Request.Form["hideBenificialId"].ToString() != "" ? "u" : "i-new"); |
|
|
|
|
|
|
|
|
|
|
|
var signatureImage = Request.Form["hddSignatureImage"]; |
|
|
|
|
|
|
|
|
string receiverId = GetStatic.ReadQueryString("receiverId", ""); |
|
|
|
|
|
|
|
|
var dbResult = _cd.UpdateBenificiarInformation(benificiar, GetStatic.GetUser()); |
|
|
|
|
|
string img = hddImgURL.Value; |
|
|
|
|
|
if (dbResult.ErrorCode == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (dbResult.ErrorCode == "0" && !string.IsNullOrEmpty(signatureImage) && !string.IsNullOrWhiteSpace(signatureImage)) |
|
|
|
|
|
|
|
|
var PaymentModeValue = Request.Form["paymentMode"].ToString(); |
|
|
|
|
|
var trimmedReceiverFName = Request.Form["ReceiverFName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverFName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
var trimmedReceiverMName = Request.Form["ReceiverMName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverMName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
var trimmedReceiverLName = Request.Form["ReceiverLName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverLName"].ToString().ToUpper().Trim(); |
|
|
|
|
|
|
|
|
|
|
|
BenificiaryModel benificiar = new BenificiaryModel(); |
|
|
|
|
|
|
|
|
|
|
|
string Country = Request.Form["Country"].ToString(); |
|
|
|
|
|
benificiar.Country = Country.Split('(')[0]; |
|
|
|
|
|
benificiar.NativeCountry = Request.Form["nativeCountry"].ToString(); |
|
|
|
|
|
benificiar.BenificiaryType = Request.Form["BenificiaryType"].ToString(); |
|
|
|
|
|
benificiar.Email = Request.Form["Email"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ReceiverFName = trimmedReceiverFName; |
|
|
|
|
|
benificiar.ReceiverMName = trimmedReceiverMName; |
|
|
|
|
|
benificiar.ReceiverLName = trimmedReceiverLName; |
|
|
|
|
|
benificiar.ReceiverAddress = Request.Form["ReceiverAddress"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ReceiverCity = Request.Form["ReceiverCity"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.ContactNo = Request.Form["ContactNo"].ToString(); |
|
|
|
|
|
benificiar.SenderMobileNo = Request.Form["SenderMobileNo"].ToString(); |
|
|
|
|
|
benificiar.Relationship = Request.Form["Relationship"].ToString(); |
|
|
|
|
|
benificiar.PlaceOfIssue = Request.Form["PlaceOfIssue"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.TypeId = Request.Form["TypeId"].ToString(); |
|
|
|
|
|
benificiar.TypeValue = Request.Form["TypeValue"].ToString(); |
|
|
|
|
|
benificiar.PurposeOfRemitance = Request.Form["PurposeOfRemitance"].ToString(); |
|
|
|
|
|
benificiar.OtherPurpose = Request.Form["OtherPrupose"].ToString(); |
|
|
|
|
|
benificiar.PaymentMode = Request.Form["PaymentMode"].ToString(); |
|
|
|
|
|
benificiar.PayoutPatner = Request.Form["PayoutPatner"].ToString(); |
|
|
|
|
|
benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString(); |
|
|
|
|
|
benificiar.BankLocation = Request.Form["BankLocation"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.BankName = Request.Form["BankName"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString(); |
|
|
|
|
|
benificiar.Remarks = Request.Form["Remarks"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.OtherRelationDescription = Request.Form["OtherRelationDescription"].ToString().ToUpper(); |
|
|
|
|
|
benificiar.membershipId = Request.Form["membershipId"].ToString(); |
|
|
|
|
|
benificiar.ReceiverId = Request.Form["ReceiverId"].ToString(); |
|
|
|
|
|
//benificiar.customerId = (Request.Form["hideCustomerId"].ToString() != "" ? Request.Form["hideCustomerId"].ToString() : null);
|
|
|
|
|
|
benificiar.customerId = customerIdVal; |
|
|
|
|
|
benificiar.branchText = Request.Form["branchManual"].ToString(); |
|
|
|
|
|
//benificiar.agentId = GetStatic.GetAgent().ToInt();
|
|
|
|
|
|
|
|
|
|
|
|
benificiar.Flag = (Request.Form["hideBenificialId"].ToString() != "" ? "u" : "i-new"); |
|
|
|
|
|
|
|
|
|
|
|
var signatureImage = Request.Form["hddSignatureImage"]; |
|
|
|
|
|
|
|
|
|
|
|
var dbResult = _cd.UpdateBenificiarInformation(benificiar, GetStatic.GetUser()); |
|
|
|
|
|
string img = hddImgURL.Value; |
|
|
|
|
|
if (dbResult.ErrorCode == "0") |
|
|
{ |
|
|
{ |
|
|
var result = _cd.GetCustomerDetailsForFileUpload(dbResult.Extra.Split('|')[0]).Split('|'); |
|
|
|
|
|
var customerId = result[0]; |
|
|
|
|
|
var membershipId = result[1]; |
|
|
|
|
|
var registerDate = result[2]; |
|
|
|
|
|
|
|
|
|
|
|
string signatureName = GetStatic.UploadSignatureImage(signatureImage, registerDate, membershipId, customerId); |
|
|
|
|
|
if (signatureName != "1") |
|
|
|
|
|
|
|
|
if (dbResult.ErrorCode == "0" && !string.IsNullOrEmpty(signatureImage) && !string.IsNullOrWhiteSpace(signatureImage)) |
|
|
{ |
|
|
{ |
|
|
_cd.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName |
|
|
|
|
|
, "Staff Visit - Bene. Reg(Customer Signature)", dbResult.Id); |
|
|
|
|
|
|
|
|
var result = _cd.GetCustomerDetailsForFileUpload(dbResult.Extra.Split('|')[0]).Split('|'); |
|
|
|
|
|
var customerId = result[0]; |
|
|
|
|
|
var membershipId = result[1]; |
|
|
|
|
|
var registerDate = result[2]; |
|
|
|
|
|
|
|
|
|
|
|
string signatureName = GetStatic.UploadSignatureImage(signatureImage, registerDate, membershipId, customerId); |
|
|
|
|
|
if (signatureName != "1") |
|
|
|
|
|
{ |
|
|
|
|
|
_cd.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName |
|
|
|
|
|
, "Staff Visit - Bene. Reg(Customer Signature)", dbResult.Id); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
var jsonString = JsonConvert.SerializeObject(dbResult); |
|
|
|
|
|
Response.ContentType = "application/json"; |
|
|
|
|
|
Response.Write(jsonString); |
|
|
|
|
|
Response.End(); |
|
|
} |
|
|
} |
|
|
var jsonString = JsonConvert.SerializeObject(dbResult); |
|
|
|
|
|
Response.ContentType = "application/json"; |
|
|
|
|
|
Response.Write(jsonString); |
|
|
|
|
|
Response.End(); |
|
|
|
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
DbResult Result = new DbResult() |
|
|
|
|
|
{ |
|
|
|
|
|
ErrorCode = "1", |
|
|
|
|
|
Msg = ex.InnerException.ToString() |
|
|
|
|
|
}; |
|
|
|
|
|
var jsonString = JsonConvert.SerializeObject(Result); |
|
|
|
|
|
Response.ContentType = "application/json"; |
|
|
|
|
|
Response.Write(jsonString); |
|
|
|
|
|
Response.End(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void LoadPayoutPartner() |
|
|
private void LoadPayoutPartner() |
|
|