Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (txttaikhoan.Text == "admin" && txtmatkhau.Text == "admin")
     {
         BTLon_KSan.Form1 fm = new BTLon_KSan.Form1();
         fm.FormClosing += fm_FormClosing;
         fm.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Không đúng", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
 }
Exemplo n.º 2
0
 private void txtmatkhau_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (txttaikhoan.Text == "admin" && txtmatkhau.Text == "admin")
         {
             BTLon_KSan.Form1 fm = new BTLon_KSan.Form1();
             fm.FormClosing += fm_FormClosing;
             fm.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Không đúng", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         }
     }
 }