forked from thetuyen124/CNPM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhomeql.cs
94 lines (81 loc) · 2.52 KB
/
homeql.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CNPM
{
public partial class homeql : Form
{
private string StringConnect;
private SqlConnection Connect = null;
public homeql(string con):this()
{
StringConnect = con;
}
public homeql()
{
InitializeComponent();
}
private void homeql_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
private void đăngXuấtToolStripMenuItem_Click(object sender, EventArgs e)
{
Form a = new dangnhap();
a.Show();
this.Hide();
}
private void quảnLýNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex=0;
}
private void homeql_Load(object sender, EventArgs e)
{
Connect = new SqlConnection(StringConnect); //Khởi tạo kết nối với đường dẫn StringConnect
Connect.Open();
}
private void quảnLýNhàCungCấpToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 1;
}
private void quảnLýLoạiHàngToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 2;
}
private void quảnLýKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 3;
}
private void hóaĐơnToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 4;
}
private void báoCáoToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 5;
}
private void đăngXuấtToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form a =new dangnhap();
a.Show();
this.Hide();
}
private void thêmKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
{
Form a = new nvthemkhachhang();
a.Show();
}
private void xóaKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
{
Form a = new qlkhachhang();
a.Show();
}
}
}