コード例 #1
0
        public UbahStaffPendaftaran(string id, string nama, string alamat, string telp, string jenisK,
                                    DaftarPendaftaran df)
        {
            InitializeComponent();
            DataContext = new MPendaftaran(id, nama, alamat, telp, " ", jenisK);
            sp          = new SmartCardOperation();

            conn = DBConnection.dbConnection();
            cmd  = new DBCommand(conn);

            if (sp.IsReaderAvailable())
            {
            }
            else
            {
                MessageBox.Show("Tidak ada reader tersedia, pastikan reader sudah terhubung dengan komputer.", "Error",
                                MessageBoxButton.OK, MessageBoxImage.Error);
            }

            this.df = df;
            if (jenisK == "Pria")
            {
                cbJenisKelamin.SelectedIndex = 0;
            }
            else if (jenisK == "Wanita")
            {
                cbJenisKelamin.SelectedIndex = 1;
            }
        }
コード例 #2
0
        public TambahStaffPendaftaran(DaftarPendaftaran dp)
        {
            InitializeComponent();
            this.dp     = dp;
            DataContext = _mDaftarBaru;

            sp = new SmartCardOperation();

            if (sp.IsReaderAvailable())
            {
            }
            else
            {
                MessageBox.Show("Tidak ada reader tersedia, pastikan reader sudah terhubung dengan komputer.", "Error",
                                MessageBoxButton.OK, MessageBoxImage.Error);
            }

            conn = DBConnection.dbConnection();
            cmd  = new DBCommand(conn);
        }