private void btnBaru_Click(object sender, EventArgs e) { switch (kelola) { case "Pelanggan": { CustomerMaster c = new CustomerMaster(); c.ShowDialog(this); break; } case "Pemasok": { SupplierMaster s = new SupplierMaster(); s.ShowDialog(this); break; } case "Pelayan": { TambahPekerja t = new TambahPekerja(); t.ShowDialog(this); break; } case "Pereparasi": { TambahPekerja t = new TambahPekerja(); t.ShowDialog(this); break; } case "Komponen": { Komponen k = new Komponen(); k.ShowDialog(this); break; } case "Alat Kerja": { AlatKerjaMaster a = new AlatKerjaMaster(); a.ShowDialog(this); break; } case "Pemasok Alat": { AlatSupplier a = new AlatSupplier(); a.ShowDialog(this); break; } case "Pemasok Komponen": { KomponenSupplier k = new KomponenSupplier(); k.ShowDialog(this); break; } case "Alat Elektronik": { AlatElektronik a = new AlatElektronik(); a.ShowDialog(this); break; } case "Jenis Alat": { JenisAlatElektronik j = new JenisAlatElektronik(); j.ShowDialog(this); break; } } }
private void btnBaruKomponen_Click(object sender, EventArgs e) { Komponen komponen = new Komponen(txtnama_komponen.Text); komponen.ShowDialog(this); }