GetUnlockGroups

Definition

Usage

Obtain the open door combination of the device.

Parameter

Device number

Open door combination of the current device. The return values include 10

combinations separated by ":". For example, "12:23:14:15::::::." represent four valid

combinations, that is, combination 1 (12 represents groups 1 and 2), combination 2

(23 represent groups 2 and 3), combination 3 (14 represent groups 1 and 4), and

combination 4 (15 represent groups 1 and 5).

Return Value

Return True if it is successful, or return False.

Related Function

SetUnlockGroups

 

Ejemplo

C#

    /// <summary>
    /// Get the unlock groups combination information. 
    /// </summary>
    /// <param name="Groups">Open door combination of the current device. The return values include 10
    /// combinations separated by ":". For example, "12:23:14:15::::::." represent four valid
    /// combinations, that Is, combination 1 (12 represents groups 1 And 2), combination 2
    /// (23 represent groups 2 And 3), combination 3 (14 represent groups 1 And 4), And
    /// combination 4 (15 represent groups 1 And 5).</param>
    /// <param name="IP"> Ip of device </param>
    /// <param name="Port"> Port of Device </param>
    /// <param name="MachineNumber"> Device Number </param>
    private void GetUnlockGroups(string Groups = "", 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.GetUnlockGroups(MachineNumber, ref Groups))
            {
                MessageBox.Show("The Groups are: " + Groups, "Success");
            }
    else
            {
                axCZKEM1.GetLastError(ref idwErrorCode);
                MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
            }
        }

VB

    ''' <summary>
    ''' Get the unlock groups combination information. 
    ''' </summary>
    ''' <param name="Groups">Open door combination of the current device. The return values include 10
    ''' combinations separated by ":". For example, "12:23:14:15::::::." represent four valid
    ''' combinations, that Is, combination 1 (12 represents groups 1 And 2), combination 2
    ''' (23 represent groups 2 And 3), combination 3 (14 represent groups 1 And 4), And
    ''' combination 4 (15 represent groups 1 And 5).</param>
    ''' <param name="IP"> Ip of device </param>
    ''' <param name="Port"> Port of Device </param>
    ''' <param name="MachineNumber"> Device Number </param>
    Private Sub GetUnlockGroups(Optional Groups As String = "", 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 New zkemkeeper.CZKEM
        axCZKEM1.Connect_Net(IP, Port)
    Dim idwErrorCode As Integer = 0
    If axCZKEM1.GetUnlockGroups(MachineNumber, Groups) = True Then
            MsgBox("The Groups are: " + Groups, MsgBoxStyle.Information, "Success")
    Else
            axCZKEM1.GetLastError(idwErrorCode)
            MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
    End If
    End Sub