Obtain the time slot setting of a specified group. The difference from GetGroupTZs is the return value format.
return value format.
Device number
Group index. The value ranges from 1 to 5.
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.
Return True if it is successful, or return False.
SetGroupTZStr, GetGroupTZs
/// <summary> /// Get the time zones used by specified group  /// </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 void GetGroupTZStr(int GroupIndex, string TZs, 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 sVerifyStyle = ""; if (axCZKEM1.GetGroupTZStr(MachineNumber, GroupIndex, ref TZs)) //Parameter sTZs is in strings. { MessageBox.Show("Time Zone: " + TZs, "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } if (axCZKEM1.GetSysOption(MachineNumber, "GVS" + GroupIndex.ToString(), out sVerifyStyle)) { MessageBox.Show("VerifyStyle: " + sVerifyStyle, "Success"); } }
''' <summary> ''' Get the time zones used by specified group ''' </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 GetGroupTZStr(GroupIndex As Integer, 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.GetGroupTZStr(MachineNumber, GroupIndex, TZs) = True Then MsgBox("Groups:" & GroupIndex.ToString(), MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub