Obtain the time slots of a user. The only difference between this function and GetUserTZs is
the format of returned time slot index.
Device number
User ID
Unlock time slot of a user. The formats are as follows:
Black & white access control devices: X1:X2:X3. X1, X2, and X3 represent the
indexes of the customized time slots used by the user. ,the value of X1is 0 to use
the group time slot. To determine whether the user uses the group time slot, check
the return value of the UseGroupTimeZone function. For example, if user A uses
customized time slots 1, 2, and 3, the fingerprint device returns "1:2:0". If user B uses
the group time zone, the fingerprint reader returns 0:0:0.
Return True if it is successful, or return False.
SetUserTZStr, GetUserTZs
/// <summary> /// Get the timezone by the user's id. The detailed meaning of the parameter is mentioned in the development manual. /// </summary> /// <param name="UserID">User ID</param> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void GetUserTZStr(int UserID = 0, 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; string sTZs = ""; if (axCZKEM1.GetUserTZStr(MachineNumber, UserID, ref sTZs)) //TZs is in strings. { MessageBox.Show("UserTZStr:" + sTZs, "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
''' <summary> ''' Get the timezone by the user's id. The detailed meaning of the parameter is mentioned in the development manual. ''' </summary> ''' <param name="GroupIndex">Group index. The value ranges from 1 to 5.</param> ''' <param name="TZs">Index of the time slot used by the group described by GroupIndex. Each group ''' contains three time slots separated by ":". For example, the Return value "1:23:13" ''' means that the indexes Of the three time slots Of the group are 1, 23, And 13.</param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub GetUserTZStr(GroupIndex As Integer, Optional TZs 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.GetUserTZStr(MachineNumber, GroupIndex, TZs) = True Then 'TZs is in strings. MsgBox("TZs Groups:" & TZs, MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub