private void button1_Click(object sender, EventArgs e) { BLL.AdminBLL objUB = new BLL.AdminBLL(); BLL.UsersBLL objUU = new BLL.UsersBLL(); if (objUB.Login(textBox1.Text, textBox2.Text)) { LoginOk = true; this.Close(); } else if (objUU.Login(textBox1.Text, textBox2.Text)) { LoginYes = true; this.Close(); //SetTxtEvent(textBox1.Text); } else { MessageBox.Show("Access Denied!"); LoginOk = false; } }