示例#1
0
        private void btnDN_Click(object sender, EventArgs e)
        {
            NguoiDungBUS nguoiDungBus = new NguoiDungBUS();

            if (nguoiDungBus.KTraDangNhap(txt_Username.Text, txt_MatKhau.Text))
            {
                Program.Username = txt_Username.Text;
                this.Close();
                th = new Thread(OpenForm);
                th.SetApartmentState(ApartmentState.STA);
                th.Start();
            }
            else
            {
                MessageBox.Show("Đăng nhập thất bại");
            }
        }