private void btnBaru_Click(object sender, EventArgs e)
        {
            GenericIdentity myIdentity = new GenericIdentity(txtJenis.Text);

            string[] myRole = new string[10];

            GenericPrincipal myPrincipal = new GenericPrincipal(myIdentity, myRole);

            Thread.CurrentPrincipal = myPrincipal;

            JenisAlatElektronik jenis = new JenisAlatElektronik();

            jenis.ShowDialog(this);
        }
Beispiel #2
0
        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;
            }
            }
        }