private void btnLogin_Click(object sender, EventArgs e) { Service1 s = new Service1(); bool valid; bool check; if (rbtnDesigner.Checked) { s.LoginDesigner(txtUsernsme.Text, txtPassword.Text, out valid, out check); if (valid) { MessageBox.Show("logged in"); Designer d = Designer.GetInstance(); d.Show(); this.Hide(); } else { MessageBox.Show("invalid"); } } else if (rbtnAdmin.Checked) { s.LoginAdmin(txtUsernsme.Text, txtPassword.Text, out valid, out check); if (valid) { MessageBox.Show("logged in"); Admin d = Admin.GetInstance(); d.Show(); this.Hide(); } else { MessageBox.Show("invalid"); } } else { MessageBox.Show("Select Admin or Designer"); } }