Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to disable menu or menu items at runtime as paramete
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
01061779
Message ID:
01061800
Views:
13
Hi Boris,
As a user rights i've func that reads from user rights table (user01.dbf) and its disabling menus as userright at runtime.

* usage on menu skip for section
! menuright(m.gcUser,"stock","read") && stock is form name ,read is right
user01.dbf structure like below

userid c(10), formname c(50) , read L,write L,edit L,delete L
Function MenuRight
Lparameters tcUser, tcRightName, tcRight
Local llResult, lcCommand

If ! Used("user01")
	Use Addbs(m.gcData)+'user01' Again Shared In 0
Endif

If Seek(Alltrim(m.tcUser) + Alltrim(m.tcRightName), "user01", "kulhak")
	m.lcCommand = "user01." + m.tcRight
	m.llResult = &lcCommand
Endif
Return m.llResult
Endfunc
this works fine

i wantto disabled menus for module based such as Invoice,Customer etc.. this requer me eg. some clients bought all of modules , some clients bought only Invoice ... so that don't wantto use different sources only will set the modules on a dbf (such as modules) then app will disable related menus ( module menus )

ohh hope that explain :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform