private void button1_Click(object sender, EventArgs e) { { conn.sqlConnection1.Open(); SqlCommand smd = new SqlCommand("insert into po_tbl(poid,podate,vid,amount,product)values(@poid,@podate,@vid,@amount,@product)", conn.sqlConnection1); smd.Parameters.AddWithValue("@poid", textBox1.Text); smd.Parameters.AddWithValue("@podate", textBox2.Text); smd.Parameters.AddWithValue("@vid", comboBox1.Text); smd.Parameters.AddWithValue("@amount", textBox3.Text); smd.Parameters.AddWithValue("@product", textBox4.Text); smd.ExecuteNonQuery(); MessageBox.Show("Data Inserted"); conn.sqlConnection1.Close(); } { GRN grn = new GRN(); grn.Show(); this.Hide(); } }
private void button7_Click(object sender, EventArgs e) { GRN grn = new GRN(); grn.Show(); }