Sounds like you want to add a column to your BO but not expose it using a strong-typed property. You have two options here:1) Return the column in your SQL query that fills the BO
2) Stuff the values into the BO in .NET after it gets filled
First Option
If those fields would be present in your query, you can just include them in it and they will be accessible on the row, but not exposed through a strong-typed property.
So, if you have a "Customer" BO with "cs_FirstName", "cs_LastName", and "cs_ID", but want to add a calculated status column of "cs_Status", then you could formulate your SQL query like this:
SELECT
cs_FirstName,
cs_LastName,
cs_ID,
(your calculation query here) AS cs_Status
FROM Customers
Once you use that to fill your BO, you can access that status column by referring to the current row:
CType(MyCustomerBO.CurrentRow.Item("cs_Status"), String)
Note that since it isn't strong typed, you will probably want to specify the type when you reference that column by using a CType.
Second Option
For the second option, the cleanest thing would probably be to create a method to add the values for you. The method is basically going to take the internal datatable of the business object, add a column, and then populate that column for each item in the BO. Again you'll want to do this after the BO gets populated:
Private Sub CalculateStatus(ByRef dt As DataTable)
'-- Establish Locals
Dim MyStatus As String = ""
'-- Add column
dt.Columns.Add(New DataColumn("cs_Status))
'-- Iterate through the rows and set the status
For Each row As DataRow In dt.Rows
MyStatus = *Your Status Calculation Here*
row.Item("cs_Status") = MyStatus
Next
End Sub
You would then call that method by passing over the datatable:
CalculateStatus(MyCustomersBO.CurrentDataTable)
And would reference the resulting status item in the same way as if you had passed the value back from SQL:
CType(MyCustomerBO.CurrentRow.Item("cs_Status"), String)