View Single Post
  #7 (permalink)  
Old July 18th, 2007, 09:42 PM
navdeep navdeep is offline
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by planoie
 My suggestions would be to use a single instance of your user details class. Set the appropriate values when the class is constructed. Modify the constructor of the necessary forms such that you must pass user details into it. Each form could have a private instance of the user details or you could abstract that out to a base form class from which all applicable forms are derived. I believe this would be the best approach because it keeps your other forms decoupled from external dependencies (such as static class vars or hooks back into a parent form).

-Peter
Thanks Peter.
Can you please elaborate a bit on these


Quote:
quote:My suggestions would be to use a single instance of your user details class.
Quote:
quote:
Each form could have a private instance of the user details or you could abstract that out to a base form class from which all applicable forms are derived.
How can I ensure this ?

- Do you agree with two classes with user_code and user_type repeating in both the classes.



Reply With Quote