|
You define the user's access to different vendor manipulation functions before you call a particular dialog. For instance, consider this scenario:
You have developed a system using the EasyHL7MC40 objects which relies on specific HL7 Vendor definitions which you have customized and subsequently ship with your system. You want to allow end users at the client site to have access to some of the features in the UserInterfaces but you don't want to run the risk of an end user inadvertently deleting or modifying your custom vendor definition(s). At the same time, you want to make sure that YOU or your support team CAN have full access to the UserInterfaces should you need to do on-site or remote support.
The Answer lies in the VendorAccess Property of the UserInterfaces object. This property is a new class object called TWHL7VendorAccessLevel.
Namespace: EasyHL7MC40_UI Object Name: TWHL7VendorAccessLevel Constructor: Accessed through the VendorAccess property of the UserInterfaces Class Declaration: Private MyHL7UI As EasyHL7MC40_UI.UserInterfaces Creation: MyHL7UI = New EasyHL7MC40_UI.UserInterfaces(MyVendorObject) Usage: With MyHL7UI.VendorAccess
![]() From the Example Application
Properties
Methods
Example Code Scenario 1: In these examples MyVendorObject is a fully instantiated HL7Vendor object which has a Vendor definition opened (see the OpenVendor method). See Programming with the HL7Vendor Object for more information.
Dim obUI As New EasyHL7MC40_UI.UserInterfaces(MyVendorObject)
With obUI 'I want to grant the user full access to everything BUT 'my program relies on the HL7Vendors being in a 'pre-defined location so I don't want the user to change it. 'Step 1: Give them Full Access .VendorAccess.GrantAllVendorAccess() 'Step 2: Take away the rights to change the vendor path .VendorAccess.AllowVendorPathChange = False .ProductName = "My HL7 Application" .WebSite = "www.hermetechnz.com" .ShowVendorManager() If .UpdatesWereMade Then MessageBox.Show("You changed something!") End If End With
Example Code Scenario 2:
Dim obUI As New EasyHL7MC40_UI.UserInterfaces(MyVendorObject)
With obUI 'I want to grant the user full access to everything BUT 'only those users who know the password. Also my vendors 'are installed in a pre-defined location so I don't want 'the user to change it. 'Step 1: Give them Full Access .VendorAccess.GrantAllVendorAccess() 'Step 2: Take away the rights to change the vendor path .VendorAccess.AllowVendorPathChange = False 'Step 3: Set a password in the object .VendorAccess.Password = "Password123" .ProductName = "My HL7 Application" .WebSite = "www.hermetechnz.com" .ShowVendorManager() If .VendorAccess.UserEnteredPassword.ToUpper <> .VendorAccess.Password.ToUpper Then Messagebox.Show("You DID NOT KNOW the Password!") End If End With |