Here is come code that I found on StackOverflow, you need a ListView on your form named "lvLogs" to be able to use it:
private void btnGetGeneralLogData_Click(object sender, EventArgs e)
{
if (bIsConnected == false)
{
MessageBox.Show("Please connect the device first", "Error");
return;
}
string sdwEnrollNumber = "";
int idwTMachineNumber=0;
int idwEMachineNumber=0;
int idwVerifyMode=0;
int idwInOutMode=0;
int idwYear=0;
int idwMonth=0;
int idwDay=0;
int idwHour=0;
int idwMinute=0;
int idwSecond = 0;
int idwWorkcode = 0;
int idwErrorCode=0;
int iGLCount = 0;
int iIndex = 0;
Cursor = Cursors.WaitCursor;
lvLogs.Items.Clear();
axCZKEM1.EnableDevice(iMachineNumber, false);
if (axCZKEM1.ReadGeneralLogData(iMachineNumber))
{
while (axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, out sdwEnrollNumber, out idwVerifyMode,
out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkcode))
{
iGLCount++;
lvLogs.Items.Add(iGLCount.ToString());
lvLogs.Items[iIndex].SubItems.Add(sdwEnrollNumber);
lvLogs.Items[iIndex].SubItems.Add(idwVerifyMode.ToString());
lvLogs.Items[iIndex].SubItems.Add(idwInOutMode.ToString());
lvLogs.Items[iIndex].SubItems.Add(idwYear.ToString() + "-" + idwMonth.ToString() + "-" + idwDay.ToString() + " " + idwHour.ToString() + ":" + idwMinute.ToString() + ":" + idwSecond.ToString());
lvLogs.Items[iIndex].SubItems.Add(idwWorkcode.ToString());
iIndex++;
}
}
else
{
Cursor = Cursors.Default;
axCZKEM1.GetLastError(ref idwErrorCode);
if (idwErrorCode != 0)
{
MessageBox.Show("Reading data from terminal failed,ErrorCode: " + idwErrorCode.ToString(),"Error");
}
else
{
MessageBox.Show("No data from terminal returns!","Error");
}
}
axCZKEM1.EnableDevice(iMachineNumber, true);
Cursor = Cursors.Default;
}