private void btnBaruSupplier_Click(object sender, EventArgs e) { //GenericIdentity myIdentity = new GenericIdentity(); //string[] myRole = new string[10]; // GenericPrincipal myPrincipal = new GenericPrincipal(myIdentity,myRole); //Thread.CurrentPrincipal = myPrincipal; SupplierMaster supplier = new SupplierMaster(txtnama_supplier.Text); supplier.ShowDialog(this); }
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; } } }