-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default.aspx.cs
51 lines (41 loc) · 1.39 KB
/
Default.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class loginnew : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void buttenIN_Click(object sender, EventArgs e)
{
Session["Name"] = TBusername.Text;
Session["Password"] = TBpassword.Text;
DBservices dbs = new DBservices();
try
{
string iswork = dbs.chekIN(TBusername.Text, TBpassword.Text);
if (iswork == "false")
ans.Text = "שם סיסמא לא נכונים";
else
if (iswork == "worker")
Response.Redirect("OrderList.aspx",false);
else
if (iswork == "manager")
Response.Redirect("ManagementSystem/Homepage.aspx", false);
else
Response.Redirect("Meconomist.aspx",false);
}
catch (Exception ex)
{
ErrHandler.WriteError(ex.Message);
Response.Write("קיימת בעיה אנא נסה שנית מאוחר יותר");
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("forgotPASS.aspx", false);
}
}