i have digital persona device version U.are.U5100.
we are using in c# with sdk, its generate a unique code every thumb impression.
i am saving unique code in sql server but how to fetch with this code.
because its give every time new unique code.
private void OnCaptured(CaptureResult captureResult)
{
try
{
if (!_sender.CheckCaptureResult(captureResult)) return;
foreach (Fid.Fiv fiv in captureResult.Data.Views)
{
SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height));
a = fiv.Bytes;
String aas =Convert.ToString(fiv.Bytes);
}
DataResult<fmd> resultConversion = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Constants.Formats.Fmd.ANSI);
DataTable dt = new DataTable();
dt = getdata(a);
if (dt.Rows.Count > 0)
{
fingervalue = Fmd.SerializeXml(resultConversion.Data);
if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS)
{
_sender.Reset = true;
throw new Exception(resultConversion.ResultCode.ToString());
}
firstFinger = Fmd.DeserializeXml(Convert.ToString(dt.Rows[1]["Finger_Value"]));
if (count == 0)
{
SendMessage(Action.SendMessage, "Enrollment 3.");
thirdFinger = resultConversion.Data;
CompareResult compareResult = Comparison.Compare(firstFinger, 0, thirdFinger, 0);
if (compareResult.ResultCode != Constants.ResultCode.DP_SUCCESS)
{
_sender.Reset = true;
throw new Exception(compareResult.ResultCode.ToString());
}
String m1 = " (fingerprints matched)";
String m2 = " (fingerprints did not match)";
SendMessage(Action.SendMessage, "Comparison resulted in a dissimilarity score of " +
compareResult.Score.ToString() + (compareResult.Score < (PROBABILITY_ONE / 100000) ? m1 : m2));
if (compareResult.Score < (PROBABILITY_ONE / 100000))
{
try
{
if (!_sender.CheckCaptureResult(captureResult)) return;
foreach (Fid.Fiv fiv in captureResult.Data.Views)
{
SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height));
}
}
catch (Exception ex)
{
SendMessage(Action.SendMessage, "Error: " + ex.Message);
}
}
else
{
pictureBox2.Image = null;
}
SendMessage(Action.SendMessage, "Place a finger on the reader.");
count = 0;
}
}
else
{
if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS)
{
_sender.Reset = true;
throw new Exception(resultConversion.ResultCode.ToString());
}
if (count == 0)
{
SendMessage(Action.SendMessage, "Enrollment 1.");
try
{
if (!_sender.CheckCaptureResult(captureResult)) return;
foreach (Fid.Fiv fiv in captureResult.Data.Views)
{
SendMessage1(Action1.SendBitmap, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height));
fingervalue = Fmd.SerializeXml(resultConversion.Data);
widht = fiv.Width;
height = fiv.Height;
a = fiv.Bytes;
savedata();
}
}
catch (Exception ex)
{
SendMessage(Action.SendMessage, "Error: " + ex.Message);
}
firstFinger = resultConversion.Data;
count += 1;
SendMessage(Action.SendMessage, "Now place the same finger on the reader.");
}
else if (count == 1)
{
SendMessage(Action.SendMessage, "Enrollment 2.");
try
{
if (!_sender.CheckCaptureResult(captureResult)) return;
foreach (Fid.Fiv fiv in captureResult.Data.Views)
{
SendMessage2(Action2.SendBitmap2, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height));
fingervalue = Fmd.SerializeXml(resultConversion.Data); ;
widht = fiv.Width;
height = fiv.Height;
a = fiv.Bytes;
savedata();
}
}
catch (Exception ex)
{
SendMessage(Action.SendMessage, "Error: " + ex.Message);
}
secondFinger = resultConversion.Data;
count += 1;
SendMessage(Action.SendMessage, "Now place the same finger on the reader.");
}
else if (count == 2)
{
SendMessage(Action.SendMessage, "Enrollment 3.");
thirdFinger = resultConversion.Data;
CompareResult compareResult = Comparison.Compare(secondFinger, 0, thirdFinger, 0);
if (compareResult.ResultCode != Constants.ResultCode.DP_SUCCESS)
{
_sender.Reset = true;
throw new Exception(compareResult.ResultCode.ToString());
}
String m1 = " (fingerprints matched)";
String m2 = " (fingerprints did not match)";
SendMessage(Action.SendMessage, "Comparison resulted in a dissimilarity score of " +
compareResult.Score.ToString() + (compareResult.Score < (PROBABILITY_ONE / 100000) ? m1 : m2));
if (compareResult.Score < (PROBABILITY_ONE / 100000))
{
try
{
if (!_sender.CheckCaptureResult(captureResult)) return;
foreach (Fid.Fiv fiv in captureResult.Data.Views)
{
SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height));
fingervalue = Fmd.SerializeXml(resultConversion.Data); ;
widht = fiv.Width;
height = fiv.Height;
a = fiv.Bytes;
savedata();
}
}
catch (Exception ex)
{
SendMessage(Action.SendMessage, "Error: " + ex.Message);
}
}
else
{
pictureBox2.Image = null;
}
SendMessage(Action.SendMessage, "Place a finger on the reader.");
count = 0;
}
}
}
catch (Exception ex)
{
SendMessage(Action.SendMessage, "Error: " + ex.Message);
}
}</fmd>