private void mBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminDB ae = new AdminDB();

            ae.Show();
        }
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminDB ll = new AdminDB();

            ll.Show();
        }
 private void btlogin_Click(object sender, EventArgs e)
 {
     try
     {
         SqlConnection con = new SqlConnection();
         con.ConnectionString = "data source = AIRONY-LAPTOP;database = GymManagementSystem;integrated security = SSPI";
         SqlCommand cmd = new SqlCommand(
             cmdText: "Select * from admininfo where username='******'and password='******'", connection: con);
         con.Open();
         SqlDataAdapter adapt = new SqlDataAdapter(cmd);
         DataSet        ds    = new DataSet();
         adapt.Fill(ds);
         con.Close();
         int count = ds.Tables[0].Rows.Count;
         if (count == 1)
         {
             MessageBox.Show("Login Successful!");
             this.Hide();
             AdminDB fm = new AdminDB();
             fm.Show();
         }
         else
         {
             MessageBox.Show("Login Failed!");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }