|
@ -1,6 +1,11 @@ |
|
|
using Swift.DAL.OnlineAgent; |
|
|
|
|
|
|
|
|
using Newtonsoft.Json; |
|
|
|
|
|
using Swift.API.Common; |
|
|
|
|
|
using Swift.API.Common.Enum; |
|
|
|
|
|
using Swift.API.TPAPIs; |
|
|
|
|
|
using Swift.DAL.OnlineAgent; |
|
|
using Swift.web.Library; |
|
|
using Swift.web.Library; |
|
|
using System; |
|
|
using System; |
|
|
|
|
|
using System.Collections.Generic; |
|
|
using System.Data; |
|
|
using System.Data; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
|
|
@ -16,8 +21,9 @@ namespace Swift.web.MobileRemit.Admin.Reports |
|
|
protected void Page_Load(object sender, EventArgs e) |
|
|
protected void Page_Load(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
Authenticate(); |
|
|
Authenticate(); |
|
|
btnUpdate.Enabled = true; |
|
|
|
|
|
|
|
|
//btnUpdate.Enabled = true;
|
|
|
btnReset.Enabled = true; |
|
|
btnReset.Enabled = true; |
|
|
|
|
|
btnActivate.Enabled = false; |
|
|
|
|
|
|
|
|
if (!IsPostBack) |
|
|
if (!IsPostBack) |
|
|
{ |
|
|
{ |
|
@ -99,9 +105,20 @@ namespace Swift.web.MobileRemit.Admin.Reports |
|
|
cusData.Visible = true; |
|
|
cusData.Visible = true; |
|
|
registrationTypeDiv.Visible = true; |
|
|
registrationTypeDiv.Visible = true; |
|
|
|
|
|
|
|
|
|
|
|
if ((customerDetails.Rows[0]["createdFrom"].ToString() == "C") || (customerDetails.Rows[0]["createdFrom"].ToString() == "O")) |
|
|
|
|
|
{ |
|
|
|
|
|
if(customerDetails.Rows[0]["mobileApprovedDate"].ToString() == "") |
|
|
|
|
|
{ |
|
|
|
|
|
btnActivate.Enabled = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
btnActivate.Enabled = false; |
|
|
|
|
|
} |
|
|
if (customerDetails.Rows[0]["approvedBy"].ToString() != "") |
|
|
if (customerDetails.Rows[0]["approvedBy"].ToString() != "") |
|
|
{ |
|
|
{ |
|
|
btnUpdate.Enabled = false; |
|
|
|
|
|
|
|
|
//btnUpdate.Enabled = false;
|
|
|
btnReset.Enabled = false; |
|
|
btnReset.Enabled = false; |
|
|
} |
|
|
} |
|
|
else if (customerDetails.Rows[0]["customerSource"].ToString() == "temp") |
|
|
else if (customerDetails.Rows[0]["customerSource"].ToString() == "temp") |
|
@ -110,7 +127,7 @@ namespace Swift.web.MobileRemit.Admin.Reports |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
btnUpdate.Enabled = true; |
|
|
|
|
|
|
|
|
//btnUpdate.Enabled = true;
|
|
|
btnReset.Enabled = true; |
|
|
btnReset.Enabled = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -168,16 +185,16 @@ namespace Swift.web.MobileRemit.Admin.Reports |
|
|
tblKycDetail.InnerHtml = str.ToString(); |
|
|
tblKycDetail.InnerHtml = str.ToString(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected void update_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
string customerId = txtSearchData.Value.Split('|')[0]; |
|
|
|
|
|
string customerSource = txtSearchData.Value.Split('|')[1]; |
|
|
|
|
|
string kycType = rbKycType.SelectedValue; |
|
|
|
|
|
|
|
|
//protected void update_Click(object sender, EventArgs e)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// string customerId = txtSearchData.Value.Split('|')[0];
|
|
|
|
|
|
// string customerSource = txtSearchData.Value.Split('|')[1];
|
|
|
|
|
|
// string kycType = rbKycType.SelectedValue;
|
|
|
|
|
|
|
|
|
var dbResult = _cd.UpdateKycType(customerId, kycType, customerSource, GetStatic.GetUser()); |
|
|
|
|
|
GetStatic.AlertMessage(this.Page, dbResult.Msg); |
|
|
|
|
|
|
|
|
// var dbResult = _cd.UpdateKycType(customerId, kycType, customerSource, GetStatic.GetUser());
|
|
|
|
|
|
// GetStatic.AlertMessage(this.Page, dbResult.Msg);
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//}
|
|
|
protected void reset_Click(object sender, EventArgs e) |
|
|
protected void reset_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
string customerId = txtSearchData.Value.Split('|')[0]; |
|
|
string customerId = txtSearchData.Value.Split('|')[0]; |
|
@ -193,5 +210,60 @@ namespace Swift.web.MobileRemit.Admin.Reports |
|
|
GetStatic.AlertMessage(this.Page, "Customer KYC has been successfully cleared."); |
|
|
GetStatic.AlertMessage(this.Page, "Customer KYC has been successfully cleared."); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
protected void activate_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
string customerId = txtSearchData.Value.Split('|')[0]; |
|
|
|
|
|
var custompass = PasswordGenerator.GenerateRandomPassword(); |
|
|
|
|
|
var membershipId = Request.Form["membershipId"]; |
|
|
|
|
|
var dbRes = _cd.ActivateMobileLogin(GetStatic.GetUser(), customerId, custompass, membershipId); |
|
|
|
|
|
|
|
|
|
|
|
if (dbRes.ErrorCode == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
DataRow result = _cd.GetDetailsWithPinNo(customerId, GetStatic.GetUser()); |
|
|
|
|
|
//CustomerDetails cd = _cd.GetUserDetails(selecteduserId);
|
|
|
|
|
|
var email = result["userName"].ToString(); |
|
|
|
|
|
List<Mapping> bodyMappings = new List<Mapping>(); |
|
|
|
|
|
|
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "CustomerName", SText = result["FullName"].ToString() }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "CustomerId", SText = customerId }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "Address", SText = result["Address1"].ToString() }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "EMAIL_ID", SText = email }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "PASS_WORD", SText = result["Password"].ToString() }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "PIN_NO", SText = result["PinNo"].ToString() }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SendNotificationRequestMobile request = new SendNotificationRequestMobile() |
|
|
|
|
|
{ |
|
|
|
|
|
IsBulkNotification = false, |
|
|
|
|
|
UserName = email, |
|
|
|
|
|
ProcessId = Guid.NewGuid().ToString(), |
|
|
|
|
|
ProviderId = NotifyTemplate.PIN_PASSWORD_EMAIL.ToString(), |
|
|
|
|
|
NotificationTypeId = NOTIFICATION_TYPE.EMAIL.ToString(), |
|
|
|
|
|
Template = NotifyTemplate.PIN_PASSWORD_EMAIL, |
|
|
|
|
|
Recipients = new List<RecipientViewModel>() |
|
|
|
|
|
{ |
|
|
|
|
|
new RecipientViewModel() |
|
|
|
|
|
{ |
|
|
|
|
|
NotificationContent = new NotificationDTO() { |
|
|
|
|
|
Body = JsonConvert.SerializeObject(bodyMappings), |
|
|
|
|
|
//Title will be set by mapping json
|
|
|
|
|
|
}, |
|
|
|
|
|
Address= email |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var res = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL); |
|
|
|
|
|
|
|
|
|
|
|
txtSearchData.Text = ""; |
|
|
|
|
|
cusData.Visible = false; |
|
|
|
|
|
registrationTypeDiv.Visible = false; |
|
|
|
|
|
GetStatic.AlertMessage(this, dbRes.Msg); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
GetStatic.AlertMessage(this, dbRes.Msg); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |