private void buttonback_Click(object sender, EventArgs e)
        {
            this.Hide();
            TeacherDashBoard B = new TeacherDashBoard(s);

            B.Show();
        }
        private void tBackBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            TeacherDashBoard TD = new TeacherDashBoard(a);

            TD.Show();
        }
        private void LoginBtn_Click(object sender, EventArgs e)
        {
            con = new SqlConnection(@"data source= rafi\SqlExpress;" +
                                    "database= Course;" +
                                    "integrated security= SSPI");



            cmd = new SqlCommand("SELECT * from login", con);
            //cmd.Parameters.AddWithValue("@idid", IdBox.Text);
            //cmd.Parameters.AddWithValue("@pass", PassBox.Text);
            con.Open();
            bool flag = false;

            using (SqlDataReader oReader = cmd.ExecuteReader())
            {
                while (oReader.Read())
                {
                    string uid  = oReader["ID"].ToString();
                    string pass = oReader["Password"].ToString();
                    int    stat = Convert.ToInt32(oReader["Status"]);
                    if (uid.Equals(IdBox.Text) && pass.Equals(PassBox.Text))
                    {
                        flag = true;
                        if (stat == 1)
                        {
                            this.Hide();
                            Admin a = new Admin();
                            a.Show();
                        }
                        else if (stat == 2)
                        {
                            this.Hide();
                            Student_1 a = new Student_1(uid);
                            a.Show();
                        }
                        else
                        {
                            this.Hide();
                            TeacherDashBoard a = new TeacherDashBoard(uid);
                            a.Show();
                        }
                    }
                }
                if (!flag)
                {
                    MessageBox.Show("Error");
                }
            }
        }