private void button1_Click(object sender, EventArgs e) { confirmation c = new confirmation("fu"); c.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(conString); con.Open(); if (con.State == System.Data.ConnectionState.Open) { string q = "insert into field values ('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "', '" + textBox3.Text.ToString() + "')"; SqlCommand comm = new SqlCommand(q, con); int rows = comm.ExecuteNonQuery(); if (rows != -1) { confirmation c = new confirmation("fi"); c.Show(); this.Hide(); } } con.Close(); }
private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(conString); con.Open(); if (con.State == System.Data.ConnectionState.Open) { string query = "delete from field where f_ID='" + textBox1.Text + "'"; SqlCommand comm = new SqlCommand(query, con); int rows = comm.ExecuteNonQuery(); if (rows != -1) { confirmation c = new confirmation("fd"); c.Show(); this.Hide(); } } con.Close(); }
private void button3_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(conString); con.Open(); if (con.State == System.Data.ConnectionState.Open) { string q = "insert into reservoir values ('" + p1 + "','" + p2 + "','" + p3 + "','" + p4 + "','" + p5 + "','" + p6 + "','" + p7 + "','" + p8 + "','" + p9 + "','" + p10 + "','" + p11 + "','" + p12 + "','" + p13 + "','" + p14 + "','" + p15 + "','" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','','')"; SqlCommand comm = new SqlCommand(q, con); int rows = comm.ExecuteNonQuery(); if (rows != -1) { confirmation c = new confirmation("ri"); c.Show(); this.Hide(); } } con.Close(); }
private void button2_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(conString); con.Open(); if (con.State == System.Data.ConnectionState.Open) { string q = "update reservoir set Field_ID='" + p2 + "', [Name of Asset/Basin/Institute/CoD]='" + p3 + "', Field='" + p4 + "', Sand='" + p5 + "', [Project Title]='" + p6 + "', [EOR Method]='" + p7 + "', [EOR Sub-Method]='" + p8 + "', [Group Name]='" + p9 + "', Stages='" + p10 + "', [Year/Duration]='" + p11 + "', [Reported Issue On]='" + p12 + "', Highlights='" + p13 + "', Remarks='" + p14 + "', [Additional Data]='" + p15 + "', [Update Date]='" + textBox1.Text.ToString() + "', [Update User]='" + textBox2.Text.ToString() + "' where r_ID = '" + p1 + "'"; SqlCommand comm = new SqlCommand(q, con); int rows = comm.ExecuteNonQuery(); if (rows != -1) { confirmation c = new confirmation("ru"); c.Show(); this.Hide(); } } con.Close(); }