protected void SortAndBindRecords(string sortCriteria) { string datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]); ReportDa da = new ReportDa(); DataTable sortdt = da.GetNeuroSpecimenMissingPathology(datasetSql); string SortField; switch (sortCriteria) { case "PtName": SortField = "PtLastName"; SortData(sortdt, SortField); break; case "PtMRN": SortField = "PtMRN"; SortData(sortdt, SortField); break; case "OpDate": SortField = "OpDate"; SortData(sortdt, SortField); break; case "Disease": SortField = "Disease"; SortData(sortdt, SortField); break; case "Specimens": SortField = "Specimens"; SortData(sortdt, SortField); break; case "PathDate": SortField = "PathDate"; SortData(sortdt, SortField); break; } reportResults.DataSource = sortdt.DefaultView; reportResults.DataBind(); }
override protected void Page_Load(object sender, System.EventArgs e) { datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]); ReportDa da = new ReportDa(); DataTable dt = da.GetNeuroSpecimenMissingPathology(datasetSql); if (dt.Rows.Count > 0) { reportResults.DataSource = dt.DefaultView; reportResults.DataBind(); // log report view base.LogReportView(); resultMessage = "There are " + dt.Rows.Count + " missing Pathology records/fields for specimen patients"; } else { resultMessage = "There are no missing Pathology records for specimen patients"; } }