Taahir
Posts: 2
|
| Posted: 11/11/2009, 1:46 AM |
|
Hey ppl
Im having a problem with executing my 'before execute select custom code' to restrict certain level of users to access certain information. I need to know the exact code because the one i hav doesnt work properly
if (LocalLevelTypeID == "National")
{
((TableCommand)Select).Operation = "AND";
((TableCommand)Select).Where = "Branches.NationalLevel = " + LocalLevelID;
}
if (LocalLevelTypeID == "Provincial")
{
((TableCommand)Select).Operation = "AND";
((TableCommand)Select).Where = "Branches.ProvincialLevel = " + LocalLevelID;
}
if (LocalLevelTypeID == "Branch")
{
((TableCommand)Select).Operation = "AND";
((TableCommand)Select).Where = "Branches.BranchManagerLevel = " + LocalLevelID;
}
if (LocalLevelTypeID == "1")
{
((TableCommand)Select).Operation = "AND";
((TableCommand)Select).Where = "View_PreStartupTotals.Assessor = " + DBUtility.UserId;
}
|
 |
 |
damian
Posts: 838
|
| Posted: 11/11/2009, 2:34 AM |
|
another way you could do this would be to create 4 panels each containing a grid with the appropriate select
show/hide grids based on security level...
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
damian
Posts: 838
|
| Posted: 11/11/2009, 2:46 AM |
|
you might also get some ideas from this post: http://forums.codecharge.com/posts.php?post_id=73703
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |