-
Notifications
You must be signed in to change notification settings - Fork 0
/
User_Login.cs
46 lines (42 loc) · 1.19 KB
/
User_Login.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Project
{
public partial class User_Login : Form
{
Function fn = new Function();
string query;
public User_Login()
{
InitializeComponent();
}
private void btnULogin_Click_1(object sender, EventArgs e)
{
query = "select First_name,Identification_Number from customer where First_name='" + txtUUsername.Text + "' and Identification_Number='" + txtUPassword.Text + "'";
DataSet ds = fn.getData(query);
if (ds.Tables[0].Rows.Count != 0)
{
labelError.Visible = false;
DashboardUser dbu = new DashboardUser();
this.Hide();
dbu.Show();
}
else
{
labelError.Visible = true;
txtUPassword.Clear();
}
}
private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}