-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForgotPassword.aspx.cs
54 lines (46 loc) · 1.48 KB
/
ForgotPassword.aspx.cs
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class ForgotPassword : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnCheck_Click(object sender, EventArgs e)
{
LUT_Asset_Users ui = new LUT_Asset_Users() { UserID = txtUserID.Text };
UserInfoRepository repo = new UserInfoRepository();
var resultU = repo.CheckUser(ui);// this is for storing that string value and checking since if uses only boolean values
// else
//{
// /*Session["UserID"] = ui.UserID;*/
// Response.Write("Not Valid UserID");
//}
if (resultU != null)
{
SecurityQ.Text = resultU; //way to print on screen
}
}
protected void btnLogIn_Click(object sender, EventArgs e)
{
Response.Redirect("LogIn.aspx");
}
protected void btnCA_Click(object sender, EventArgs e)
{
LUT_Asset_Users ui = new LUT_Asset_Users() { SecurityA = txtSecurityA.Text, UserID = txtUserID.Text };
UserInfoRepository repo = new UserInfoRepository();
var resultA = repo.CheckAnswer(ui);
if (resultA == null)
{
/*Session["UserID"] = ui.UserID;*/
Response.Write("Not Valid Answer");
}
else
{
txtPassword.Text = resultA;
}
}
}