Set the time slot of a specified group. The only difference between this function and
SetGroupTZs is the 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.
GetGroupTZs, SetGroupTZs
/// <summary> /// Set the time zones used by specified group /// </summary> /// <param name="GroupIndex">Group index. The value ranges 1 to 5.</param> /// <param name="TZs">Index of the time slot. 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="VerifyStyle"></param> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void SetGroupTZStr(int GroupIndex, string TZs, string VerifyStyle, 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.SetGroupTZStr(MachineNumber, GroupIndex, TZs)) { axCZKEM1.RefreshData(MachineNumber);//the data in the device should be refreshed MessageBox.Show("SetGroupTZStr, GroupIndex:" + GroupIndex.ToString() + " TZs:" + TZs, "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } // Set Group VerifyStyle axCZKEM1.SetSysOption(MachineNumber, "GVS" + GroupIndex.ToString(), VerifyStyle); }
''' <summary> ''' Set the time zones used by specified group ''' </summary> ''' <param name="GroupIndex">Group index. The value ranges 1 to 5.</param> ''' <param name="TZs">refer to the development manual to learn the format of the time zone(in strings )</param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub SetGroupTZStr(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.SetGroupTZStr(MachineNumber, GroupIndex, TZs) = True Then axCZKEM1.RefreshData(MachineNumber) 'the data in the device should be refreshed MsgBox("SetGroupTZStr, GroupIndex:" & GroupIndex.ToString() + " TZs:" & TZs, MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub