Community
Showing results for 
Search instead for 
Do you mean 
Reply

How can check act login by Admin or not ?

Avid Listener
Posts: 30
Country: india

How can check act login by Admin or not ?

Hi Dear All,

 

We need very urgent help about ACT login Case.

(1) I want to check ACT is login by Admin or not? how can we check it . anyone can help me ASAP.   what I will do .

 

please help me ASAP . how can I do it by coding through or design layout . I do not known it.

 

 

SNS

Saket 

Tuned Listener
Posts: 11
Country: India

Re: How can check act login by Admin or not ?

Try this

 

 

'creating new framework object

 Dim actapp As ActFramework

actapp = 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

 

Avid Listener
Posts: 30
Country: india

How can check act login by Admin or not ? does not work

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 ActFramework

actapp = 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 

Copper Contributor
Posts: 91
Country: USA

Re: How can check act login by Admin or not ?

Hi,

 Not sure if your using C# of VB but this code will get you the info you need.

 

          
            //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