private void tampilMhs(string NIM) { cDatabase db = new cDatabase(); cQuery qr = new cQuery(); DataTable dt = db.selectData(qr.qSelectNamaRfidMhsByNim(NIM), '2'); if (dt.Rows.Count != 0) { foreach (DataRow rowMhs in dt.Rows) { txt_nik.Text = rowMhs["STUDENTID"].ToString(); txt_nama.Text = rowMhs["FULLNAME"].ToString(); txtRfid.Text = rowMhs["RFID"].ToString(); } } dt.Clear(); dt.Dispose(); }