private void button3_Click(object sender, EventArgs e) { Manage_Rubric gre = new Manage_Rubric(); this.Hide(); gre.Show(); }
private void Button1_Click(object sender, EventArgs e) { if (updatesource.var != -1) { con.Open(); string query = "INSERT INTO RUBRIC( Details , CLOId) VALUES('" + textBox1.Text.ToString() + "', '" + Convert.ToInt32(textBox2.Text) + "')"; SqlCommand cmd = new SqlCommand(query, con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("Successfull"); } else { con.Open(); string query = "INSERT INTO RUBRIC( Details , CLOId) Values('" + textBox1.Text.ToString() + "','" + Convert.ToInt32(textBox2.Text) + "' )"; SqlCommand cmd = new SqlCommand(query, con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("Successfull"); } Manage_Rubric juu = new Manage_Rubric(); this.Hide(); juu.Show(); }