Browse Source

numeric password for activate mobile

Ime-london-webcore
Leeza Baidar 6 months ago
parent
commit
f3d556343d
  1. 13
      Swift.web/Library/PasswordGenerator.cs
  2. 3
      Swift.web/MobileRemit/Admin/Reports/CustomerRegistrationStatus.aspx.cs

13
Swift.web/Library/PasswordGenerator.cs

@ -74,6 +74,19 @@ namespace Swift.web.Library
return new string(chars.ToArray());
}
public static string GenerateRandomNumericPassword(int length = 8)
{
Random rand = new Random();
string password = "";
for (int i = 0; i < length; i++)
{
password += rand.Next(0, 10);
}
return password;
}
}
}

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

@ -216,7 +216,8 @@ namespace Swift.web.MobileRemit.Admin.Reports
protected void activate_Click(object sender, EventArgs e)
{
string customerId = txtSearchData.Value.Split('|')[0];
var custompass = PasswordGenerator.GenerateRandomPassword();
//var custompass = PasswordGenerator.GenerateRandomPassword();
var custompass = PasswordGenerator.GenerateRandomNumericPassword();
var membershipId = Request.Form["membershipId"];
var dbRes = _cd.ActivateMobileLogin(GetStatic.GetUser(), customerId, custompass, membershipId);

Loading…
Cancel
Save