Obtain the time slot setting of a user. Each user has three time slots. The only difference between this function and GetUserTZStr is the format of returned time slot index.
Device number
User ID
Open door time slot of a user. The TZs pointers have three values that store indexes of three time slots respectively. The indexes of three time slots can be obtained by using TZs[0], TZs[1], and TZs[2] respectively.
Return True if it is successful, or return False.
SetUserTZs, SetUserTZStr
//Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); int iMachineNumber = 1; axCZKEM1.Connect_Net("10.0.0.43", 4370); int idwErrorCode = 0; int iUserID = 1; string sTZs = ""; if (axCZKEM1.GetUserTZStr(iMachineNumber, iUserID, ref sTZs))//TZs is in the form of string. { MessageBox.Show(" UserTZs " + sTZs); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); }
'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM Dim iMachineNumber As Integer axCZKEM1.Connect_Net("10.0.0.43", 4370) Dim idwErrorCode As Integer Dim iUserID As Integer = 1 Dim sTZs As String = "" If axCZKEM1.GetUserTZStr(iMachineNumber, iUserID, sTZs) = True Then 'TZs is in strings. MsgBox(" UserTZs: " & sTZs) Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If