private void btn_agregarHuella() { huella.huella = Template.Bytes; huella.nombre = txt_nombre.Text; string conex = huella.conex; PreparandoAcceso.InsertaHuella(huella, conex); llenarDataGridView(); }
private void llenarDataGridView() { DataTable dt = new DataTable(); string conex = huella.conex; dt = PreparandoAcceso.BuscaListado(conex); dgv_lista.DataSource = dt; dgv_lista.Refresh(); }
protected void Process(DPFP.Sample Sample) { DrawPicture(ConvertSampleToBitmap(Sample)); // Process the sample and create a feature set for the enrollment purpose. DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification); // Check quality of the sample and start verification if it's good // TODO: move to a separate task if (features != null) { // Compare the feature set with our template DPFP.Verification.Verification.Result result = new DPFP.Verification.Verification.Result(); Stream stream; DataTable dt = new DataTable(); HuellaDactilar huellaDactilar = new HuellaDactilar(); dt = PreparandoAcceso.BuscaHuellas(huellaDactilar.conex); for (int i = 0; i < dt.Rows.Count; i++) { string huella = dt.Rows[i][1].ToString(); byte[] byteHuella = dt.Rows[i][1] as byte[]; stream = new MemoryStream(byteHuella); Template = new DPFP.Template(stream); Verificator.Verify(features, Template, ref result); UpdateStatus(result.FARAchieved); if (result.Verified) { MakeReport($"Huella Aceptada de {dt.Rows[i][0]}"); Votacion Votacion = new Votacion(); MessageBox.Show(new Form() { TopMost = true }, $"Huella Aceptada de { dt.Rows[i][0]}"); Votacion.ShowDialog(); break; } } } }