private void button4_Click(object sender, EventArgs e) { if (this.dataGridView1.SelectedRows.Count > 0) { FrmEditDataBarang form = new FrmEditDataBarang(this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString().Trim()); if (form.Run(form)) { QueryData(new Barang { Kode = "", Nama = "", Harga = "", Satuan = "", Stok = "" }); } } }
public bool Run(FrmEditDataBarang form) { form.ShowDialog(); return(_result); }