ClearSLog

Definition

Usage

Clear all operation records from the device.

Parameter

Device number

Return Value

Return True if it is successful, or return False.

Related Function

ClearGLog, ClearKeeperData

 

Ejemplo

C#

private static void ClearSLog(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1)
{
	//Create Standalone SDK class dynamicly.
	zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
	axCZKEM1.Connect_Net(sIp, iPort);

	int idwErrorCode = 0;

	if (axCZKEM1.ClearSLog(iMachineNumber))
	{
		axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
		MessageBox.Show("All operation logs have been cleared from teiminal!", "Success");
	}
	else
	{
		axCZKEM1.GetLastError(ref idwErrorCode);
		MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
	}
}

VB

Private Sub ClearSLog(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370,
					 Optional ByVal iMachineNumber As Integer = 1)

	'Create Standalone SDK class dynamicly.
	Dim axCZKEM1 As New zkemkeeper.CZKEM
	axCZKEM1.Connect_Net(sIp, iPort)

	Dim idwErrorCode As Integer

	If AxCZKEM1.ClearSLog(iMachineNumber) = True Then
		AxCZKEM1.RefreshData(iMachineNumber) 'the data in the device should be refreshed
		MsgBox("All operation logs have been cleared from teiminal!", MsgBoxStyle.Information, "Success")
	Else
		AxCZKEM1.GetLastError(idwErrorCode)
		MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
	End If

End Sub