-
Notifications
You must be signed in to change notification settings - Fork 2
/
inputLogin.aspx.cs
executable file
·40 lines (35 loc) · 1.13 KB
/
inputLogin.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class inputLogin : System.Web.UI.Page
{
static SqlConnection con = new SqlConnection(WebConfigurationManager.ConnectionStrings["automationConnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, EventArgs e)
{
DataView dv = (DataView)(sdsadmin.Select(DataSourceSelectArguments.Empty));
int flag = 0;
for (int i = 0; i < dv.Table.Rows.Count; i++)
{
if((dv.Table.Rows[i][0].ToString()==tbid.Text)&&(dv.Table.Rows[i][1].ToString()==tbpw.Text))
{
flag = 1;
Session["inp"] = tbid.Text;
break;
}
}
if (flag == 1)
{
Response.Redirect("assembly.aspx");
}
else Response.Redirect("inputLogin.aspx");
}
}