Click here to Skip to main content
15,916,180 members
Home / Discussions / C#
   

C#

 
General.NET framework version questions... Pin
new_phoenix25-Jan-05 14:21
new_phoenix25-Jan-05 14:21 
GeneralRe: .NET framework version questions... Pin
Nick Parker25-Jan-05 17:27
protectorNick Parker25-Jan-05 17:27 
GeneralRe: .NET framework version questions... Pin
new_phoenix27-Jan-05 5:25
new_phoenix27-Jan-05 5:25 
QuestionCan no longer view Help(CHM) through windows application Pin
Mike Balfour25-Jan-05 13:29
Mike Balfour25-Jan-05 13:29 
GeneralProcedure Parameter Pointer Pin
Budi Zhu25-Jan-05 11:24
Budi Zhu25-Jan-05 11:24 
GeneralRe: Procedure Parameter Pointer Pin
Dennis C. Dietrich25-Jan-05 12:13
Dennis C. Dietrich25-Jan-05 12:13 
GeneralA Design question [offtopic?] Pin
moredip25-Jan-05 11:03
moredip25-Jan-05 11:03 
GeneralRe: A Design question [offtopic?] Pin
Skynyrd25-Jan-05 12:01
Skynyrd25-Jan-05 12:01 
I suppose it all depends on the coder's style. I'd do it this way:

1. I would create a Member class which would be an abstraction of a "real life" Member, or in other words, a Member object. It would have all the cunningly named strongly typed properties like string Name, int Id, date ExpirationDate, etc, and not much else. U could even make it a struct, but if it gets passed around a lot, it might be better to keep it as a class.

2. Then I would create a DBManager Class that would fetch, insert and update Member instances from/into the DB. This would be like your barebone original Member class but all methods/properties would be strongly typed to the Member class when necesarry:

public Member GetMember(int memberId)
{
   //Implmentation
}

public void UpdateMember(Member changedMember)
{ 
   //Implementation
}
etc...


3. And finally I would create a utility class that would perform all the functionalities upon the Member instances such as the ones you mentioned above: "UpdateLastOnLine", etc. All changes in the member instance would then be updated into the DB through the DBManager.

public void UpdateLastOnLine(Memeber member)
{
   //Implmentation
}
etc...


Hope this helps....if not quite your coding style, it might still give u some ideas. It might be an overkill for the true requirements of your app, but I always try to make my stuff in a orderly and structured fashion, even if its really not necessary.
GeneralRe: A Design question [offtopic?] Pin
moredip25-Jan-05 12:19
moredip25-Jan-05 12:19 
GeneralRe: A Design question [offtopic?] Pin
Skynyrd25-Jan-05 12:47
Skynyrd25-Jan-05 12:47 
GeneralRe: A Design question [offtopic?] Pin
moredip25-Jan-05 13:45
moredip25-Jan-05 13:45 
GeneralRe: A Design question [offtopic?] Pin
Anonymous25-Jan-05 21:56
Anonymous25-Jan-05 21:56 
GeneralCOM Port in Visual C# 2005 Pin
Juan Pablo G.C.25-Jan-05 9:08
Juan Pablo G.C.25-Jan-05 9:08 
GeneralRe: COM Port in Visual C# 2005 Pin
Stefan Troschuetz25-Jan-05 21:41
Stefan Troschuetz25-Jan-05 21:41 
GeneralCOM Port in Visual C# 2005 Pin
Juan Pablo G.C.25-Jan-05 9:06
Juan Pablo G.C.25-Jan-05 9:06 
GeneralRe: COM Port in Visual C# 2005 Pin
warnerja26-Jan-05 12:09
warnerja26-Jan-05 12:09 
GeneralHierachy on windows without MDI Pin
jpgarcia25-Jan-05 8:57
jpgarcia25-Jan-05 8:57 
Generalevent handling Pin
rchokler25-Jan-05 7:18
rchokler25-Jan-05 7:18 
GeneralRe: event handling Pin
Stefan Troschuetz25-Jan-05 21:25
Stefan Troschuetz25-Jan-05 21:25 
GeneralSpeed Hack Pin
Budi Zhu25-Jan-05 6:30
Budi Zhu25-Jan-05 6:30 
GeneralRe: Speed Hack Pin
Alex Korchemniy25-Jan-05 6:39
Alex Korchemniy25-Jan-05 6:39 
GeneralRe: Speed Hack Pin
Budi Zhu25-Jan-05 7:22
Budi Zhu25-Jan-05 7:22 
GeneralRe: Speed Hack Pin
Dave Kreskowiak25-Jan-05 8:26
mveDave Kreskowiak25-Jan-05 8:26 
GeneralRe: Speed Hack Pin
Budi Zhu25-Jan-05 11:27
Budi Zhu25-Jan-05 11:27 
GeneralRe: Speed Hack Pin
Dave Kreskowiak25-Jan-05 14:43
mveDave Kreskowiak25-Jan-05 14:43 

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.