SSR_EnableUser

Definition

Usage

Set whether a user is enabled.

Parameter

Device number

User ID

Invalid parameter without specific meanings

User enable flag. True: Enabled. False: Disabled.

Return Value

Return True if it is successful, or return False.

Related Function

None

 

Ejemplo

C#

private void EnableUser(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1)
    {
//Create Standalone SDK class dynamicly.
        zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
        axCZKEM1.Connect_Net(sIp, iPort);
int idwErrorCode = 0;
string iUserID = "1";
bool iFlag = true;
if (axCZKEM1.SSR_EnableUser(iMachineNumber, iUserID, iFlag))
        {
            MessageBox.Show("EnableUser,UserID:" + iUserID.ToString() + " iFlag:" + iFlag.ToString(), "Success");
        }
else
        {
            axCZKEM1.GetLastError(ref idwErrorCode);
            MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
        }
    }

VB

Private Sub EnableUser(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370, Optional ByVal iMachineNumber As Integer = 1)
'Create Standalone SDK class dynamicly.
Dim axCZKEM1 As New zkemkeeper.CZKEM
        axCZKEM1.Connect_Net(sIp, iPort)
Dim idwErrorCode As Integer
Dim iUserID As String = "1"
Dim iFlag As Boolean = True
If axCZKEM1.SSR_EnableUser(iMachineNumber, iUserID, iFlag) = True Then
            MsgBox("EnableUser,UserID:" + iUserID.ToString() + " iFlag:" + iFlag.ToString(), "Success")
Else
            axCZKEM1.GetLastError(idwErrorCode)
            MsgBox("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error")
End If
End Sub