private void dataGridViewBarang_DoubleClick(object sender, EventArgs e) { try { // //NotaJualDetil notaDetil = new NotaJualDetil(brg, harga, jumlah); //simpan detil barang ke nota ///nota.TambahDetilBarang(brg, harga, jumlah); /// int idx = dataGridViewBarang.CurrentRow.Index; String kodeBarang = dataGridViewBarang.Rows[idx].Cells[0].Value + ""; String noNota = textBoxNoNota.Text; //MessageBox.Show(noNota+","+kodeBarang); //int idx=dataGridViewBarang.CurrentRow.Index; String msg = NotaJual.delete(noNota, kodeBarang); if (!msg.Equals("")) { MessageBox.Show(msg); } dataGridViewBarang.Rows.RemoveAt(idx); labelGrandTotal.Text = HitungGrandTotal().ToString("0,###"); } catch (Exception ex) { } }