Browse Source

#mobile activate

Ime-london-webcore
Leeza Baidar 9 months ago
parent
commit
8b3650d65c
  1. 5
      Swift.API/Common/Enum/Notification.cs
  2. 2
      Swift.DAL/OnlineAgent/OnlineCustomerDao.cs
  3. 11
      Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx
  4. 101
      Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx.cs
  5. 8
      Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx.designer.cs

5
Swift.API/Common/Enum/Notification.cs

@ -55,6 +55,9 @@ namespace Swift.API.Common.Enum
CUSTOMER_MOBILE_NOT_REGISTER = 17,
CUSTOMER_LAWSON_REGISTER = 18,
CUSTOMER_REFERRAL_500 = 19
CUSTOMER_REFERRAL_500 = 19,
[Description("Customer Password and Txn Pin")]
PIN_PASSWORD_EMAIL = 20
}
}

2
Swift.DAL/OnlineAgent/OnlineCustomerDao.cs

@ -69,7 +69,7 @@ namespace Swift.DAL.OnlineAgent
return ExecuteDataset(sql);
}
public DbResult ActivateMobileLogin(string user, string custId, string password, string referral = null, string membershipId = "")
public DbResult ActivateMobileLogin(string user, string custId, string password, string membershipId = "", string referral = null )
{
var sql = "EXEC proc_online_approve_Customer";
sql += " @Flag ='create-mobile-login'";

11
Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx

@ -149,7 +149,7 @@
<div class="panel-heading">Registration Type :</div>
<div class="panel-body scroll-main">
<div class="row">
<div class="col-md-2 col-sm-4 hideForOrganisation">
<div class="col-md-2 col-sm-4 hideForOrganisation" style="display:none;">
<div class="form-group">
<%-- <label>KYC Type:<span class="errormsg">*</span></label>--%>
<asp:RadioButtonList ID="rbKycType" runat="server" CssClass="clearOnOrganisation"
@ -160,16 +160,17 @@
</div>
</div>
<div class="form-group">
<asp:Button ID="btnUpdate" runat="server" CssClass="btn btn-primary m-t-25" Text="Update" OnClick="update_Click" />
<%-- <asp:Button ID="btnUpdate" runat="server" CssClass="btn btn-primary m-t-25" Text="Update" OnClick="update_Click" />--%>
<asp:Button ID="btnReset" runat="server" CssClass="btn btn-primary m-t-25" Text="Reset KYC" OnClick="reset_Click" />
<asp:Button ID="btnActivate" runat="server" CssClass="btn btn-primary m-t-25" Text="Activate" OnClick="activate_Click" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row info" runat="server" id="moreData">
<div class="row info" runat="server" id="moreData" style="display:none;">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Customer Details</div>
@ -197,7 +198,7 @@
</div>
</div>
<div class="row info" runat="server" id="kycData">
<div class="row info" runat="server" id="kycData" style="display: none;">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading"><b>EKyc Details </b></div>

101
Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx.cs

@ -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 System;
using System.Collections.Generic;
using System.Data;
using System.Text;
@ -16,8 +21,9 @@ namespace Swift.web.MobileRemit.Admin.Reports
protected void Page_Load(object sender, EventArgs e)
{
Authenticate();
btnUpdate.Enabled = true;
//btnUpdate.Enabled = true;
btnReset.Enabled = true;
btnActivate.Enabled = false;
if (!IsPostBack)
{
@ -49,6 +55,7 @@ namespace Swift.web.MobileRemit.Admin.Reports
string[] customer = txtSearchData.Value.Split('|');
var customerId = customer[0];
var customerSource = customer[1];
//var membershipId = txtSearchData.Value["membershipId"].ToString();
//var source = txtSearchData.
DataSet ds = _cd.GetCustomerRegistrationStatusReport(GetStatic.GetUser(), customerId, customerSource);
@ -59,7 +66,7 @@ namespace Swift.web.MobileRemit.Admin.Reports
if (customerDetails.Rows.Count > 0)
{
PopulateCustomerDetails(customerDetails);
PopulateCustomerDetails(customerDetails);
}
else
{
@ -99,9 +106,21 @@ namespace Swift.web.MobileRemit.Admin.Reports
cusData.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() != "")
{
btnUpdate.Enabled = false;
//btnUpdate.Enabled = false;
btnReset.Enabled = false;
}
else if (customerDetails.Rows[0]["customerSource"].ToString() == "temp")
@ -110,7 +129,7 @@ namespace Swift.web.MobileRemit.Admin.Reports
}
else
{
btnUpdate.Enabled = true;
//btnUpdate.Enabled = true;
btnReset.Enabled = true;
}
}
@ -168,16 +187,16 @@ namespace Swift.web.MobileRemit.Admin.Reports
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)
{
string customerId = txtSearchData.Value.Split('|')[0];
@ -193,5 +212,61 @@ namespace Swift.web.MobileRemit.Admin.Reports
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);
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 = result["userName"].ToString() });
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 = result["userName"].ToString(),
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= result["userName"].ToString()
}
}
};
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);
}
}
}
}

8
Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx.designer.cs

@ -123,22 +123,22 @@ namespace Swift.web.MobileRemit.Admin.Reports
protected global::System.Web.UI.WebControls.RadioButtonList rbKycType;
/// <summary>
/// btnUpdate control.
/// btnReset 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 btnUpdate;
protected global::System.Web.UI.WebControls.Button btnReset;
/// <summary>
/// btnReset control.
/// btnActivate 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 btnReset;
protected global::System.Web.UI.WebControls.Button btnActivate;
/// <summary>
/// moreData control.

Loading…
Cancel
Save