-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNameService.cs
More file actions
34 lines (26 loc) · 988 Bytes
/
Copy pathNameService.cs
File metadata and controls
34 lines (26 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public int ForgotPassword(string email)
{
string procName = "[dbo].[NAME_SelectByEmail]";
int id = 0;
_dataProvider.ExecuteCmd(procName, delegate (SqlParameterCollection col)
{
col.AddWithValue("@Email", email);
}, delegate (IDataReader reader, short set)
{
id = reader.GetSafeInt32(0);
}
);
return id;
}
public int ResetPassword(UpdatePassword model)
{
string procName = "[dbo].[NAME_ResetPassword]";
int id = 0;
_dataProvider.ExecuteNonQuery(procName, delegate (SqlParameterCollection paramCollection)
{
paramCollection.AddWithValue("@Guid", model.Token);
paramCollection.AddWithValue("@Password", getHash(model.Password));
}
);
return id;
}