private void Login_varify_Click(object sender, EventArgs e) { string username = textBox5.Text, password = textBox4.Text; UserAuthentication user = new UserAuthentication(username, password); string designation = user.LoginAuth().Trim().ToLower(); if (designation.Equals("non")) { MessageBox.Show("Invalide Username and Password"); } else { logout.Visible = true; textBox5.Text = ""; textBox4.Text = ""; if (designation.Equals("admin")) { label5.Text = ""; panel2.Visible = false; panel3.Visible = true; Doctor.Checked = true; create.Checked = true; panel1.Visible = true; label10.Text = "Admin"; } else if (designation.Equals("receptionist")) { panel1.Visible = false; panel2.Visible = false; panel3.Visible = false; panel4.Visible = false; panel5.Visible = true; radioButton101.Checked = true; panel101.Visible = true; panel110.Visible = false; label10.Text = "Receptionist"; } else if (designation.Equals("doctor")) { panel1.Visible = false; panel2.Visible = false; panel3.Visible = false; panel4.Visible = false; panel5.Visible = false; panel101.Visible = false; panel110.Visible = false; panel6.Visible = true; panel106.Visible = true; panel109.Visible = false; radioButton121.Checked = true; label10.Text = "Doctor"; } else { panel1.Visible = false; panel2.Visible = false; panel3.Visible = false; panel4.Visible = false; panel5.Visible = false; panel101.Visible = false; panel110.Visible = false; panel6.Visible = false; panel106.Visible = false; panel109.Visible = false; panel7.Visible = true; panel107.Visible = false; panel108.Visible = false; panel103.Visible = true; radioButton111.Checked = true; label10.Text = "Pharmacist"; } } }