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; } }
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); }