private void button10_Click(object sender, EventArgs e) { try { if (dataGridView1[6, dataGridView1.CurrentRow.Index].Value.ToString() == "belum bayar") { bayar = new Pembayaran(); bayar.Kode = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString(); bayar.main = this; bayar.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }