Re: Proper OOP Use

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have 3 projects in my solutions like this: one for Data Access,
one for Business Logic, and the UI.

The classes are in the BL layer. It calls the DAL and loads the
data into the class.

In this case, I would have a class for Customers, and I would
have another class called CustomerList. This would implement
BindingList(Of Customer) so I could bind it to a DataGridView
(or whatever) for display. I put all of the fields in it, and
use a method on the Customer class to populate the rows.

I use data binding to bind my classes to the fields on the
screen.

I can send you some sample code for the list stuff if you like;
I just posted it to the c# newsgroup, although the code is in VB.

Robin S.
----------------------------------
"Ivan Weiss" <ivan.weiss@xxxxxxxxxxxx> wrote in message
news:%23CxsX$3LHHA.2028@xxxxxxxxxxxxxxxxxxxxxxx
I am using VB.net and have a question on how to handle one aspect of
OOP
programming.

I have a class for Customers, Vendors, and Employees each of which
inherits a master class, Contacts

Now on my customer center screen I want to fill a list box with all of
my customers in my database on the left and on the right have their
individual account information shown when the user selects a customer.

What is the proper way to fill the database? in VB6 days I would just
directly access the database and create a list of customers and
everytime one was selected directly call their information for the
right
from the database.

With OOP should there be a class that has all of the customers in
them?
Should it be a collection? Not quite sure which direction to take
this
in...

Of course when I select a user I will fill my appropriate Customer
class
with the customer the user selected and populate the appropriate
fields
that way...

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages

  • Re: OOP/OOD Philosophy
    ... between database logic and "business" logic. ... this would not longer be "business" ... tomorrow be regarded as low-level data access logic. ...
    (comp.object)
  • Re: Spreadsheet/VBA Project Consulting: 50% Discount or Even Free - Limited Time Only
    ... > UDQ Services has years of experience with MS Excel and VBA (Visual Basic ... > templates, spreadsheet applications, and database applications. ... > P001: Mortgage Transaction Spreadsheet Database ... Customer List Converted from Excel Table to Word ...
    (microsoft.public.excel.worksheet.functions)
  • Spreadsheet/VBA Project Consulting: 50% Discount or Even Free - Limited Time Only
    ... UDQ Consulting Services Believes that Every Problem Should Have an Easy & ... templates, spreadsheet applications, and database applications. ... P001: Mortgage Transaction Spreadsheet Database ... Customer List Converted from Excel Table to Word ...
    (microsoft.public.excel.programming)
  • Spreadsheet/VBA Consulting - 50% Off or Even Free
    ... UDQ Consulting Services Believes that Every Problem Should Have an Easy & ... templates, spreadsheet applications, and database applications. ... P001: Mortgage Transaction Spreadsheet Database ... Customer List Converted from Excel Table to Word ...
    (microsoft.public.excel.misc)
  • Spreadsheet/VBA Consulting - 50% Off or Even Free
    ... UDQ Consulting Services Believes that Every Problem Should Have an Easy & ... templates, spreadsheet applications, and database applications. ... P001: Mortgage Transaction Spreadsheet Database ... Customer List Converted from Excel Table to Word ...
    (microsoft.public.excel.newusers)