Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FrmMenu frm = new FrmMenu();

            frm.Show();
            this.Hide();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            NhanVien a = new NhanVien(txtMaNhanVien.Text, txtMatKhau.Text);

            try
            {
                if (a.kiemTraDangNhap() == 1)
                {
                    FrmMenu frm1 = new FrmMenu();
                    frm1.Show();
                    this.Hide();
                }
                else
                {
                    if (a.kiemTraDangNhap() == 0)
                    {
                        FrmBanHang frm2 = new FrmBanHang();
                        frm2.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Sai ten tai khoan hoac mat khau");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Co loi xay ra", ex.ToString());
            }
        }