private void PopulateResults() { if (!String.IsNullOrEmpty(FollowUpListCriteria)) { PatientListController ct = new PatientListController(); DataSet ds = null; // get list of patients string dsSQL = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]); PatientDa ptDa = new PatientDa(); ds = ptDa.ListPatientsByContactStatusPhysicianAndDisease(dsSQL, new string[] { FollowUpListCriteria }, SelectedTreatingPhysicianId, "Treating", SelectedPatientDisease, "", 0, 0); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { rptPatient.DataSource = ds.Tables[0].DefaultView; rptPatient.DataBind(); } // three sp's used to retrieve patient lists and they all have an output parameter returning a record count ResultsRecordCount = (int)ds.Tables[0].ExtendedProperties[ExtendedProperty.RowCount]; ResultsRecordMemo = ResultsRecordCount + " patients returned"; } } }