GetDataFile

Definition

Usage

Obtain the specified data file from the device.

Parameter

Device number

Type of the data file to be obtained

1. Attendance record data file
2. Fingerprint template data file
3. None
4. Operation record data file
5. User information data file
6. SMS data file
7. SMS and user relationship data file
8. Extended user information data file
9. Work code data file

Name of the obtained data file

Return Value

Return True if it is successful, or return False.

Related Function

 

Ejemplo

C#

//Create Standalone SDK class dynamicly.
zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
private void GetDataFile(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1
    , string sFileName = "C:\\name.jpg", int iDataFlag=1

    )
{
    axCZKEM1.Connect_Net(sIp, iPort);
    int idwErrorCode = 0;

    if (axCZKEM1.GetDataFile(iMachineNumber, iDataFlag, sFileName))
    {
        MessageBox.Show("GetDataFile from the Device,DataFlag=" + iDataFlag.ToString() + " FileName=" + sFileName, "Success");
    }
    else
    {
        axCZKEM1.GetLastError(ref idwErrorCode);
        MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
    }
}

VB

Private Sub GetDataFile(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370,
                        Optional ByVal iMachineNumber As Integer = 1,
                        Optional ByVal sFileName As String = "c:\\Filename.jpg",
                        Optional ByVal iDataFlag As Integer = 1
                        )

    Dim idwErrorCode As Integer

    If axCZKEM1.GetDataFile(iMachineNumber, iDataFlag, sFileName) = True Then
        MsgBox("GetDataFile from the Device,DataFlag=" + iDataFlag.ToString() + " FileName=" + sFileName, MsgBoxStyle.Information, "Success")
    Else
        axCZKEM1.GetLastError(idwErrorCode)
        MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
    End If
End Sub