private void button3_Click(object sender, EventArgs e) { this.Hide(); FingerPrintForm f = new FingerPrintForm(); f.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { try { AdminLogin al = db.AdminLogins.Single(AdminLogin => AdminLogin.UserName == textBox1.Text && AdminLogin.Password == textBox2.Text); if ((textBox1.Text == al.UserName) && (textBox2.Text == al.Password)) { this.Hide(); FingerPrintForm f = new FingerPrintForm(); f.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("Username and password doesn't match!!\n Please try again!!"); textBox1.Text = null; textBox2.Text = null; } }