private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); LoggedInAsAcceptorDonor l = new LoggedInAsAcceptorDonor(); l.Show(); }
private void button1_Click(object sender, EventArgs e) { bool check; LoginController LC = new LoginController(); check = LC.Logged(comboBox1.Text, int.Parse(textBox1.Text), textBox2.Text); if (check == true) { if (comboBox1.Text == "Admin") { MessageBox.Show("Logged In"); this.Hide(); LoggedInAsAdmin LA = new LoggedInAsAdmin(); LA.Show(); } else if (comboBox1.Text == "Donor" || comboBox1.Text == "Acceptor") { MessageBox.Show("Logged In"); this.Hide(); LoggedInAsAcceptorDonor Lad = new LoggedInAsAcceptorDonor(); Lad.Show(); } } else { MessageBox.Show("Invalid UserName or password"); } }