DelCustomizeAttState

Definition

Usage

Delete the customized attendance state specified by to the original attendance state value.

Note: This function is a customized function. To use this function, the device must enable

the expansion function and support customized attendance state values (see

EnableCustomizeAttState).

Parameter

Device number

Original attendance state value of the customized attendance state value to be deleted

Return Value

Return True if it is successful, or return False.

Related Function

SetCustomizeAttState, EnableCustomizeAttState

 

Ejemplo

C#

        /// <summary>
/// Delete the customized attendance state specified by to the original attendance state value. Note: This function 
/// is a customized function. To use this function, the device must enable the expansion function and support customized 
/// attendance state values (see EnableCustomizeAttState).
/// </summary>
/// <param name="StateID">Original attendance state value of the customized attendance state value to be deleted</param>
/// <param name="IP"> Ip of device </param>
/// <param name="Port"> Port of Device </param>
/// <param name="MachineNumber"> Device Number </param>
private void DelCustomizeAttState(int StateID, string IP = "10.0.0.44", int Port = 4370, int MachineNumber = 1)
{
        //Create Standalone SDK class dynamicly.
	zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
	axCZKEM1.Connect_Net(IP, Port);
        int idwErrorCode = 0;
        if (axCZKEM1.DelCustomizeAttState(MachineNumber, StateID))
	{
		MessageBox.Show("DelCustomizeAttState! ", "Success");
	}
        else
	{
		axCZKEM1.GetLastError(ref idwErrorCode);
		MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
	}
}

VB

        ''' <summary>
        ''' Delete the customized attendance state specified by to the original attendance state value. Note: This function 
        ''' is a customized function. To use this function, the device must enable the expansion function and support customized 
        ''' attendance state values (see EnableCustomizeAttState).
        ''' </summary>
        ''' <param name="StateID">Original attendance state value of the customized attendance state value to be deleted</param>
        ''' <param name="IP"> Ip of device </param>
        ''' <param name="Port"> Port of Device </param>
        ''' <param name="MachineNumber"> Device Number </param>
        Private Sub DelCustomizeAttState(ByVal StateID As Integer, Optional IP As String = "10.0.0.44", Optional Port As Integer = 4370, Optional MachineNumber As Integer = 1)
        'Create Standalone SDK class dynamicly.
        Dim axCZKEM1 As zkemkeeper.CZKEMClass = New zkemkeeper.CZKEMClass()
        axCZKEM1.Connect_Net(IP, Port)
        Dim idwErrorCode As Integer = 0
        If axCZKEM1.DelCustomizeAttState(MachineNumber, StateID) Then
            MessageBox.Show("DelCustomizeAttState! ", "Success")
        Else
            axCZKEM1.GetLastError(idwErrorCode)
            MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error")
        End If
        End Sub