Click here to Skip to main content
15,887,450 members
Home / Discussions / C#
   

C#

 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 0:48
eyalle30-Dec-09 0:48 
GeneralRe: Treeview doesn't update after treenode.remove Pin
Luc Pattyn30-Dec-09 1:25
sitebuilderLuc Pattyn30-Dec-09 1:25 
AnswerRe: Treeview doesn't update after treenode.remove Pin
Ben Fair30-Dec-09 3:25
Ben Fair30-Dec-09 3:25 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 3:28
eyalle30-Dec-09 3:28 
GeneralRe: Treeview doesn't update after treenode.remove Pin
Ben Fair30-Dec-09 3:32
Ben Fair30-Dec-09 3:32 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 3:38
eyalle30-Dec-09 3:38 
Questionretrive user rights from sql table Pin
Jassim Rahma29-Dec-09 22:53
Jassim Rahma29-Dec-09 22:53 
AnswerRe: retrive user rights from sql table Pin
Ben Fair30-Dec-09 3:04
Ben Fair30-Dec-09 3:04 
Yes, in some form or fashion you need to have properties that tell you whether a particular user has a particular right. In this case you are relating a set of rights directly to a user. It is common, and may be beneficial, to use 'roles' where you construct a set of roles and each role has a set of rights associated with it, then a user is assigned a role rather than a set of individual priviledges. For example, a role named 'Admin' which has all the rights and one named 'ReadOnly' that only has the BROWSE rights. Choose whichever method works best for your needs.

As far as retrieving the rights, the best OOP way would be to have a User class and some kind of security class that would contain information about the user's rights. The User class would be a composite in that it would contain a copy of the security class. It would seem pretty straight-forward to have the User class create and fill the security object when the User class is filled with the User data (perhaps invoking a query or stored procedure to retrieve the rights data where UserID=X).

There are a myriad of ways of accomplishing this, I just gave one example to illustrate one way it could be done.

Hold on a second here... Don't you think you might be putting the horse ahead of the cart?

GeneralRe: retrive user rights from sql table Pin
Jassim Rahma30-Dec-09 10:54
Jassim Rahma30-Dec-09 10:54 
GeneralRe: retrive user rights from sql table Pin
Jassim Rahma13-Jan-10 7:43
Jassim Rahma13-Jan-10 7:43 
QuestionC# - listen to add/remove function from event Pin
bonzaiholding29-Dec-09 22:15
bonzaiholding29-Dec-09 22:15 
AnswerRe: C# - listen to add/remove function from event Pin
DaveyM6929-Dec-09 23:17
professionalDaveyM6929-Dec-09 23:17 
AnswerRe: C# - listen to add/remove function from event Pin
Afjal khan30-Dec-09 0:19
Afjal khan30-Dec-09 0:19 
QuestionC# VS 2005 Plotting real time data with Drawing 2D Pin
raj of jss29-Dec-09 21:33
raj of jss29-Dec-09 21:33 
AnswerRe: C# VS 2005 Plotting real time data with Drawing 2D Pin
Luc Pattyn30-Dec-09 0:49
sitebuilderLuc Pattyn30-Dec-09 0:49 
QuestionC# Delegates in vc++ Pin
Anu_Bala29-Dec-09 21:32
Anu_Bala29-Dec-09 21:32 
AnswerRe: C# Delegates in vc++ Pin
teejayem30-Dec-09 5:26
teejayem30-Dec-09 5:26 
QuestionRegistration of an assembly. Pin
SRKSHOME29-Dec-09 20:38
SRKSHOME29-Dec-09 20:38 
AnswerRe: Registration of an assembly. Pin
Md. Marufuzzaman29-Dec-09 21:09
professionalMd. Marufuzzaman29-Dec-09 21:09 
GeneralRe: Registration of an assembly. Pin
SRKSHOME29-Dec-09 21:48
SRKSHOME29-Dec-09 21:48 
GeneralRe: Registration of an assembly. Pin
Md. Marufuzzaman30-Dec-09 1:19
professionalMd. Marufuzzaman30-Dec-09 1:19 
Questionbreaking a string to substrings Pin
myinstincts29-Dec-09 19:21
myinstincts29-Dec-09 19:21 
AnswerRe: breaking a string to substrings Pin
myinstincts29-Dec-09 19:27
myinstincts29-Dec-09 19:27 
GeneralRe: breaking a string to substrings [modified] Pin
petercrab29-Dec-09 20:10
petercrab29-Dec-09 20:10 
GeneralRe: breaking a string to substrings Pin
coolestCoder29-Dec-09 22:16
coolestCoder29-Dec-09 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.