Exemplo n.º 1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            string name = textBox1.Text;

            con.Open();
            SqlCommand com = new SqlCommand("insert into groups values('" + name + "')", con);

            com.ExecuteNonQuery();
            con.Close();
            MessageBox.Show("Done");
            textBox1.Text = "";
            new_group ng = new new_group();

            ng.Refresh();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string name = comboBox1.Text;

            con.Open();
            SqlCommand com = new SqlCommand("delete from groups where group_name='" + name + "'", con);

            com.ExecuteNonQuery();
            con.Close();
            MessageBox.Show("Done");
            comboBox1.Text = "";
            new_group ng = new new_group();

            ng.Refresh();
        }
Exemplo n.º 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            new_group n = new new_group();

            n.ShowDialog();
        }
Exemplo n.º 4
0
        private void tabPage2_Click(object sender, EventArgs e)
        {
            new_group ng = new new_group();

            ng.Refresh();
        }