private void Back_Click(object sender, EventArgs e)
        {
            this.Close();
            Search_Teacher st = new Search_Teacher();

            st.Show();
        }
Пример #2
0
        /*  private void OnValueChangeClass(object sender, EventArgs e)
         * {
         *    string cString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Binayak_Ray\Documents\PrimaryDB.mdf;Integrated Security=True;Connect Timeout=30";
         *    SqlConnection con = new SqlConnection(cString);
         *    con.Open();
         *
         *    string query = "Select * From tbl_student Where Class_name = '" + Class_ComboBox.Text + "'";
         *    SqlCommand cmd = new SqlCommand(query, con);
         *    SqlDataReader r = cmd.ExecuteReader();
         *
         *    DataTable dt = new DataTable();
         *    dt.Load(r);
         *
         *    dataGridView1.DataSource = dt;
         * }*/

        private void Teach_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.Hide();
            if (Teach_ComboBox.Text.Equals("Search Teacher"))
            {
                Search_Teacher st = new Search_Teacher();
                st.ShowDialog();
            }
            else if (Teach_ComboBox.Text.Equals("Add New"))
            {
                NewTeacher nt = new NewTeacher();
                nt.ShowDialog();
            }
        }