ASP.Net User Role Hierarchy -


i have in project user role hierarchy pages need more, imagine 2 roles can open adduser.aspx page can see here packages packages sending companies , companies have number.

i when user of company opened page show packages him. difficult part writing code ..

code examples :

   public string number     {                 {             return                 (string)cachemanagement.getcache(                     string.format("{0}{1}", "edistraintcache", currentsession.currentuser.userid), getnumber);         }     } 

and have if statemnt in 15 pages

 if (enum.getvalues(typeof(umroles))                 .cast<umroles>()                 .any(umrole => currentuser.userroles.any(x => x.rolkey.contains(umrole.getstringvalue()))))         {             //...          } 

have suggest code or idea writing better code ?.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -