Click here to Skip to main content
15,913,669 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reorganize directories project Pin
fregolo5222-Mar-06 10:12
fregolo5222-Mar-06 10:12 
GeneralRe: Reorganize directories project Pin
S Douglas22-Mar-06 10:14
professionalS Douglas22-Mar-06 10:14 
QuestionMultidimensional arrays Pin
magja21-Mar-06 20:40
magja21-Mar-06 20:40 
AnswerRe: Multidimensional arrays Pin
Guffa21-Mar-06 22:25
Guffa21-Mar-06 22:25 
QuestionCode WSS Object Model Pin
KPR_KPR21-Mar-06 20:09
KPR_KPR21-Mar-06 20:09 
AnswerRe: Code WSS Object Model Pin
HimaBindu Vejella21-Mar-06 20:13
HimaBindu Vejella21-Mar-06 20:13 
QuestionNeed Your Attention this is General! Pin
_mubashir21-Mar-06 19:58
_mubashir21-Mar-06 19:58 
AnswerRe: Need Your Attention this is General! Pin
darkelv21-Mar-06 20:45
darkelv21-Mar-06 20:45 
There's nothing wrong with pulling the data from the row into variables, though your database, business logics and maybe user interface are all intervined together.

But IMO what is better is pulling the data from the row into variables of a class.

For example

public class Customer
{
// your private declaration of the variables ie customer name, address, phone

// the public accessors of the private variables

public validatecustomer();

public void setcustomer(DataRow row);

public DataRow Row
{
get;
}

}

As what you can see, you can add functionalities to the customer class such as populating it by passing it a row, or get the customer as a DataRow, validating it, binding the properties (variable) to controls.

It is an object oriented and 2 tier way of doing it, which separate your logics and database from each others.

-- modified at 2:45 Wednesday 22nd March, 2006
GeneralRe: Need Your Attention this is General! Pin
Bob Stanneveld22-Mar-06 10:48
Bob Stanneveld22-Mar-06 10:48 
AnswerRe: Need Your Attention this is General! Pin
Bob Stanneveld21-Mar-06 20:52
Bob Stanneveld21-Mar-06 20:52 
AnswerRe: Need Your Attention this is General! Pin
mcljava22-Mar-06 4:53
mcljava22-Mar-06 4:53 
QuestionShow/Hide Quick Lanch Bar Pin
sherwani21-Mar-06 18:25
sherwani21-Mar-06 18:25 
AnswerRe: Show/Hide Quick Lanch Bar Pin
Vasudevan Deepak Kumar21-Mar-06 21:47
Vasudevan Deepak Kumar21-Mar-06 21:47 
GeneralRe: Show/Hide Quick Lanch Bar Pin
sherwani22-Mar-06 3:14
sherwani22-Mar-06 3:14 
QuestionDatagrids and reports Pin
Jim Barber21-Mar-06 16:10
Jim Barber21-Mar-06 16:10 
QuestionAdding Outlook Contacts To Database Pin
P R Krishna21-Mar-06 15:55
P R Krishna21-Mar-06 15:55 
QuestionDeterming My Programs Directory Pin
Tyrus18221-Mar-06 14:41
Tyrus18221-Mar-06 14:41 
AnswerRe: Determing My Programs Directory Pin
Sean8921-Mar-06 15:37
Sean8921-Mar-06 15:37 
AnswerRe: Determing My Programs Directory Pin
tarasn21-Mar-06 22:32
tarasn21-Mar-06 22:32 
QuestionNHibernate Pin
Fernando A. Gomez F.21-Mar-06 14:13
Fernando A. Gomez F.21-Mar-06 14:13 
QuestionNokia 3330 Pin
rana mahummad zeeshan21-Mar-06 9:37
rana mahummad zeeshan21-Mar-06 9:37 
AnswerRe: Nokia 3330 Pin
mcljava21-Mar-06 10:29
mcljava21-Mar-06 10:29 
QuestionWhich editor is the best Pin
emran83421-Mar-06 9:19
emran83421-Mar-06 9:19 
AnswerRe: Which editor is the best Pin
Dan Neely21-Mar-06 9:38
Dan Neely21-Mar-06 9:38 
GeneralRe: Which editor is the best Pin
emran83421-Mar-06 9:41
emran83421-Mar-06 9:41 

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.