Exemple #1
0
        private void Button3_Click(object sender, EventArgs e)
        {
            QuanLySach fr = new QuanLySach();

            fr.Show();
            this.Hide();
        }
Exemple #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = con.GetData("select capnguoidung from quanly where username='******'and password='******';");
            if (dt.Rows.Count > 0)
            {
                MessageBox.Show("Đăng nhập thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                QuanLySach fr = new QuanLySach(dt.Rows[0][0].ToString());
                fr.ShowDialog();
                this.Hide();
            }
            else
            {
                this.lbstatus.ForeColor = Color.Red;
                this.lbstatus.Text      = "Tài khoản sai tài khoản hoặc mật khẩu";
            }
        }