//if the user has 1 or more items that are about to age, they will be notified and the aging button will be visible private void SetAgingWarning() { DataTable agingItems = ReportHelper.FillAgingOwnerSpecific(arr[2]); if (agingItems.Rows.Count > 0) { AgingButton.Visibility = Visibility.Visible; } }
//opens edit record form so the user can edit their items that are about to age private void AgingButton_Click(object sender, RoutedEventArgs e) { try { //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object DataTable closeToAging = ReportHelper.FillAgingOwnerSpecific(arr[2]); DataView viewAging = closeToAging.DefaultView; reportRow = viewAging[0]; List <int> IDArray = Helper.FillIDList(ReportHelper.OwnerAgingQuery(arr[2])); // this PrioritizeBySystemPage, is being passed so it can be updated //priorBySystemRow is a DataRowView object containing the data from that row of PBS datagrid EditRecord editRecord = new EditRecord(arr, reportRow, IDArray); editRecord.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }