private void btn_bayar_Click(object sender, EventArgs e) { DialogResult d = MessageBox.Show("Yakin Sesuai ?", "Warning", MessageBoxButtons.YesNo); if (d == DialogResult.Yes) { conn.Close(); conn.Open(); OracleCommand cmd = new OracleCommand("INSERT INTO htrans VALUES('" + idinput + "','" + form_login.idpeg + "', to_date('" + DateTime.Now.ToString("dd MM yyyy") + "', 'dd MM yyyy'), " + total.ToString() + ")", conn); cmd.ExecuteNonQuery(); for (int i = 0; i < dgv_detail.Rows.Count; i++) { cmd = new OracleCommand("select customer_id from customer where customer_phone = " + dgv_detail.Rows[i].Cells[3].Value.ToString(), conn); da = new OracleDataAdapter(cmd); ds = new DataSet(); da.Fill(ds); OracleCommand cmdin = new OracleCommand("insert into dtrans values('" + idinput + "','" + ds.Tables[0].Rows[0][0].ToString() + "','" + pesawat + "','" + hotel + "','" + Home.id.ToString() + "'," + biaya.ToString() + ")", conn); //MessageBox.Show(ds.Tables[0].Rows[0][0].ToString()); //MessageBox.Show(idinput); //MessageBox.Show(pesawat); //MessageBox.Show(Home.id.ToString()); cmdin.ExecuteNonQuery(); } conn.Close(); pesananBerhasil p = new pesananBerhasil(); this.Hide(); p.ShowDialog(); this.Show(); } }
private void btn_bayar_Click(object sender, EventArgs e) { pesananBerhasil p = new pesananBerhasil(); this.Hide(); p.ShowDialog(); this.Show(); }