private void toolStripButton7_Click(object sender, EventArgs e)
        {
            frmmain main = new frmmain();

            this.Hide();
            main.Show();
        }
Exemple #2
0
        private void btndangnhap_Click(object sender, EventArgs e)
        {
            TaiKhoan tk = new TaiKhoan(txttentruycap.Text.Trim(), txtmatkhau.Text.Trim());

            if (TaiKhoanBUS.Instance.DangNhap(tk))
            {
                this.Hide();
                frmmain frMain = new frmmain();
                frMain.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Đăng nhập thất bại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtmatkhau.Clear();
                txttentruycap.Focus();
            }
        }