09-19-2008 02:33 AM
Hi
are you sure? this code was running . Here I have tryied this code does not work . for any case . what will I do?
'creating new framework object
Dim actapp As ActFrameworkactapp = New ActFramework
'loggin on act
actapp.LogOn("C:\Documents and Settings\Chandrakant.Pitroda\My Documents\ACT\ACT for Windows 11\Databases\ACT11Demo.PAD", "Chris Huffman", "")
If (actapp.Roles.Equals(actapp.Roles.Role_Administrator)) Then
MessageBox.Show("admin")ElseIf (actapp.Roles.Equals(actapp.Roles.Role_Browse)) Then
MessageBox.Show("browse")ElseIf (actapp.Roles.Equals(actapp.Roles.Role_Manager)) Then
MessageBox.Show("Manager")ElseIf (actapp.Roles.Equals(actapp.Roles.Role_Restricted)) Then
MessageBox.Show("restricted")ElseIf (actapp.Roles.Equals(actapp.Roles.Role_Standard)) Then
MessageBox.Show("Standard")
End If
SNS
Saket
09-26-2008 11:19 AM
09-30-2008 11:31 AM
Hi,
I've posted this for you in all your posts about this. There are other ways to do this but this a just 1 simple way to get and manipulate the data
//Create user object and get the currently loggted in user
User testUser = ActFwk.Users.GetUser(myRecord);
//Show the user role in message box user.role.ToString()
MessageBox.Show(testUser.Role.ToString());
*Role is part of Act.Framework.Users.User Class