Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            if (txtuser.Text != " " && txtpass.Text != " ")
            {
                string tk = txtuser.Text;
                string mk = txtpass.Text;
                bool   kt = dn.dangnhap(tk, mk);
                if (kt == false)
                {
                    MessageBox.Show("dang nhap khong thanh cong!");
                }
                else
                {
                    MessageBox.Show("dang nhap thanh cong");
                    menu na = new menu(txtuser.Text);
                    na.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("Xin hãy nhập đầy đủ");
            }
        }
Beispiel #2
0
 private void buttonCancel_Click(object sender, EventArgs e)
 {
     if (quyen == "admin")
     {
         Owner.Show();
         this.Close();
     }
     else
     {
         menu frm = new menu();
         frm.Show();
         this.Close();
     }
 }