Click here to Skip to main content
15,906,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Every one..


If i have 10 modules for suppose i need to assign 8 out of 10 modules to manager role and 2modules to teacher role..
how can i assign them? any design idea please..


Thanks...
Posted
Updated 1-May-13 19:36pm
v2

Hi,
I assume that you are referring database designs.
Simple way to store in a separate datable
1.you have one table with modules
2.Another table with Roles
3.Create new table which will stores primary keys of Module and Role... in this way you can create flexible solution which you van change on later date
 
Share this answer
 
Comments
Priyanka Anumolu 2-May-13 2:57am    
thanks for reply.. i have that db design..
i need front end design in asp..
how to assign modules using that design??
1) You Module table should have ModulePageID.
2) create a common function like 'checkuseraccess(pageid)' which should call from each page onload.
3) After login take roleid and get all modules for that role from db doing some joins.
4) after that store that all modules names in some global variable like sessvars in javascript.
5) do for loop for all modules and show only wanted pages based on pageid retrevied from db.(by default your all pages should be hide).
6) On all page load call 'checkuseraccess(pageid)' with page id you reterive from db pass as parmeter and check in global variable for existence.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900