示例#1
0
 private void bt_login_Click(object sender, EventArgs e)
 {
     try
     {
         DataBase.validaUsuario(int.Parse(txbx_Usuario.Text), txbx_password.Text);
         FrmMenu menu = new FrmMenu();
         timer1.Enabled = false;
         this.Hide();
         menu.ShowDialog();
         this.Show();
         timer1.Enabled = true;
         ResetTextBoxes();
     }
     catch (Exception)
     {
         MessageBox.Show("Usuario o Clave inválidos");
         txbx_Usuario.Text  = null;
         txbx_password.Text = null;
     }
 }