No end of reading on the net and I can not get this to compile! The error
message is:
An object reference is required for the nonstatic field, method, or property
'BusinessAreaDataSet.BusinessAreaTableDataTable.Fi ndByBusinessAreaID(int)'
Could someone explain to me what I am missing ... I wish to understand why
this isn't working
public DescListLookup(UserDataSet dataSet)
{
_enabledDisplayList = new ListItemCollection();
_allDisplayList = new ListItemCollection();
BusinessAreaDataSet myBusinessAreaDataSet = new
BusinessAreaDataSet();
foreach(UserDataSet.UserListTableRow row in dataSet.UserListTable)
{
// access the business area details for this user
BusinessAreaDataSet.BusinessAreaTableRow baRow =
BusinessAreaDataSet.
BusinessAreaTableDataTable.FindByBusinessAreaID(ro w.BusinessAreaID);
// add the business area details to the the list
AddItem(baRow.BusinessAreaName, baRow.BusinessAreaID,
baRow.BusinessAreaEnabledFlag);
}
}
public BusinessAreaTableRow FindByBusinessAreaID(int BusinessAreaID)
{
return ((BusinessAreaTableRow)(this.Rows.Find(new object[]
{BusinessAreaID})));
}