Beispiel #1
0
        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Hide();
            QuanliNV ql = new QuanliNV();

            ql.Show();
        }
Beispiel #2
0
        private void nhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            QuanliNV ql = new QuanliNV();

            ql.Show();
        }
Beispiel #3
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         SqlConnection  con = new SqlConnection(@"Data Source=.;Initial Catalog=QLKS;Integrated Security=True");
         SqlDataAdapter dta = new SqlDataAdapter("Select  * From NHANVIEN Where TAIKHOAN = '" + txtUser.Text + "' and MATKHAU = '" + txtPass.Text + "' and CHUCVU = 'QuanLy'", con);
         DataTable      dtb = new DataTable();
         dta.Fill(dtb);
         if (dtb.Rows[0][0].ToString() != "NULL")
         {
             this.Hide();
             QuanliNV ql = new QuanliNV();
             ql.Show();
         }
     }catch (Exception ex)
     {
     }
     lblCB.Text = "Tai khong hoac mat khau khong chinh xac!";
 }