|
-
Jun 16th, 2004, 02:46 AM
#1
Thread Starter
Frenzied Member
How to perform property conversions?
Ok, in my business tier I have a class called Car, it has a
property of type double
Now this is a potential null field in the database
in my car class I have a method called load which calls the dataaccess tier and returns a datareader of the carinfo...
SOmehow a string must be passed to the presentation layer in the form of a double.
Because when the user access the carpage (with car id)
I do like this
dim mycar as new car(id)
txtname.text = mycar.name
txtprice.text = mycar.price
.
.
.
if I encounter a dbnull here it is very bad. But where should I define the logic that says
"If the price property of the car object is dbnull, then it should say "not available" in the presentation layer"?
And it feels bad to define the price property as string, although it would solve my problems...
kind regards
Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|