private void btnAdd_Click(object sender, EventArgs e) { string _menus = GlobalVar.TabSelected; switch (_menus) { case "Barang": ModalBarang MI = new ModalBarang(); if (MI.ShowDialog() == DialogResult.OK) { _Barang.loadBarang(); } break; case "Supplier": ModalSupplier MS = new ModalSupplier(); if (MS.ShowDialog() == DialogResult.OK) { _Supplier.loadSupplier(); } break; case "Pelanggan": ModalPelanggan MP = new ModalPelanggan(); if (MP.ShowDialog() == DialogResult.OK) { _Pelanggan.loadPelanggan(); } break; case "Pembelian": ModalPembelian MPL = new ModalPembelian(); MPL.ShowDialog(); //if ((MPL.ShowDialog() == DialogResult.OK) && (MPL.finished)) //{ // _Pembelian.loadPembelian(); //} break; } }