Ejemplo n.º 1
0
        private void btnTrovecuaqlkh_Click(object sender, EventArgs e)
        {
            frmManHinhChinh fmmhc = new frmManHinhChinh();

            fmmhc.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void BtnTroVeCuaCTPP_Click(object sender, EventArgs e)
        {
            frmManHinhChinh mhc = new frmManHinhChinh();

            mhc.Show();
            this.Hide();
        }
Ejemplo n.º 3
0
        private void btnTroVeCuaLienHe_Click(object sender, EventArgs e)
        {
            frmManHinhChinh frmManHinhChinh = new frmManHinhChinh();

            frmManHinhChinh.Show();
            this.Hide();
        }
Ejemplo n.º 4
0
        private void BtnDangNhap_Click(object sender, EventArgs e)
        {
            //gọi đến class MatKhau
            MatKhau        obj  = new MatKhau();
            List <MatKhau> list = obj.GetAll();

            string tenDangNhap = txtTenDangNhap.Text;
            string matKhau     = txtMatKhau.Text;
            var    check       = list.Where(item => item.username.Equals(tenDangNhap)).ToList();

            if (check.Count > 0)
            {
                if (check[0].password.Equals(matKhau))
                {
                    MessageBox.Show("Dang nhap thanh cong");
                    frmManHinhChinh mhc = new frmManHinhChinh();
                    mhc.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Mat khau khong dung!");
                }
            }
            else
            {
                MessageBox.Show("Khong ton tai tai khoan!");
            }
        }