private void button1_Click(object sender, EventArgs e) { p = DatabaseLinker.Login(textBox1.Text, textBox2.Text); if (null == p) MessageBox.Show("Wrong password!"); else if (p is Administrator) goNextForm(); else if (p is User) goNextForm(); else MessageBox.Show("Wrong password!"); }
public FormIndex(Person p) { person = p; InitializeComponent(); }