UserGroupTimeZone

Definition

Usage

Determine whether a user uses the group time slot setting. This function must be used together with GetUserTZs or GetUserTZStr to ensure the correct return values. That is, use GetUserTZs or GetUserTZStr to obtain the time slot settings of the specified user, and then use UseGroupTimeZone to determine whether the user uses the group time slot setting.

Parameter

None

Return Value

Return True if the group time slot is used, or return False.

Related Function]

GetUserTZs, GetUserTZStr

 

Ejemplo

C#

//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))
{
    MessageBox.Show("UserTZs "+ sTZs);
    if (axCZKEM1.UseGroupTimeZone())
    {
        MessageBox.Show("Using Group TimeZone", "Yes");
    }
    else
    {
        MessageBox.Show("Not Using Group TimeZone", "No");
    }
}
else
{
    axCZKEM1.GetLastError(ref idwErrorCode);
    MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
}

VB

'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)
    If axCZKEM1.UseGroupTimeZone() = True Then
        MsgBox("Using Group TimeZone", MsgBoxStyle.Information, "Yes")
    Else
        MsgBox("Not Using Group TimeZone", MsgBoxStyle.Information, "No")
    End If
Else
    axCZKEM1.GetLastError(idwErrorCode)
    MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
End If