I have a three-tier Windows Forms DB application in VB.NET. I'm using VS 2005.
I'd like to display records in a table in a DataGridView. I can already display the records as is by binding the DataSource to the business class that talks to the DB class:
Dim assetList as List(Of Asset)
assetList = DB_Asset.GetAssetListOrderByID_Asset
AssetDataGridView.DataSource = assetList
"Asset" is my business class, and "DB_Asset" is my DB class that queries the DB to return assetList.
Now, Asset has members something like this:
Private m_ID_Asset As Integer
Private m_CategoryID As Integer
Private m_CustodianID As Integer
Private m_ManufacturerID As Integer
Private m_SignedOutToID As Integer
Private m_DefaultLocationID As Integer
Private m_CurrentLocationID As Integer
Private m_DateAcquired As Date
Private m_DateEntered As Date
Private m_EnteredByID As Integer
m _ ID _ Asset contains the primary key for the Asset table in the DB, and everything else of the form m_XXXXXXXXXID contains a foreign key to another table in the DB.
So basically what I get now is rows with a whole lot of numbers. It's exactly what's in the Assets table:
ID_Asset CategoryID CustodianID ManufacturerID SignedOutToID
1 17 23 14 5
What I'd like to know is if there's an easy way to display the text fields that I've linked to with all of those foreign keys:
ID_Asset CategoryName CustodianName Manufacturer SignedOutTo
1 Soda - Diet John Coca-Cola Fred
Anyone with experience here have any tricks?
Thanks in advance!