Exemple #1
0
        public UbahApoteker(string id, string nama, string alamat, string no_telp, string jenisK, DaftarApoteker ua)
        {
            InitializeComponent();
            conn = DBConnection.dbConnection();
            cmd  = new DBCommand(conn);

            sp = new SmartCardOperation();

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

            DataContext = new MApoteker(id, nama, no_telp, alamat, " ");
            da          = ua;

            if (jenisK == "Pria")
            {
                cbJenisKelamin.SelectedIndex = 0;
            }
            else if (jenisK == "Wanita")
            {
                cbJenisKelamin.SelectedIndex = 1;
            }
        }
        public TambahApoteker(DaftarApoteker da)
        {
            InitializeComponent();

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

            this.da     = da;
            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);
            }
        }