Example #1
0
        /// <summary>
        ///
        /// CREATOR: Steve Coonrod
        /// CREATED: 3\08\2020
        /// APPROVER: Ryan Morganti
        ///
        /// This is an event handler for when the datagrid is loaded
        /// Retrieves its item source from the DB through the event manager
        ///
        /// </summary>
        /// <remarks>
        ///
        /// UPDATER: NA
        /// UPDATED: NA
        /// UPDATE: NA
        ///
        /// </remarks>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgEventList_Approved_Loaded(object sender, RoutedEventArgs e)
        {
            List <PUEvent> eventList = new List <PUEvent>();

            try
            {
                if (dgEventList_Approved.ItemsSource == null)
                {
                    eventList = _eventManager.GetEventsByStatus("Approved");
                    eventList.AddRange(_eventManager.GetEventsByStatus("Active"));
                    dgEventList_Approved.ItemsSource = eventList;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.InnerException.Message);
            }
        }
        /// <summary>
        ///
        /// CREATOR: Steve Coonrod
        /// CREATED: 3\08\2020
        /// APPROVER: Ryan Morganti
        ///
        /// This is an event handler for when the datagrid is loaded
        /// Retrieves its item source from the DB through the event manager
        ///
        /// </summary>
        /// <remarks>
        ///
        /// UPDATER: NA
        /// UPDATED: NA
        /// UPDATE: NA
        ///
        /// </remarks>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgEventList_Pending_Loaded(object sender, RoutedEventArgs e)
        {
            List <PUEvent> eventList = new List <PUEvent>();

            try
            {
                if (dgEventList_Pending.ItemsSource == null)
                {
                    eventList = _eventManager.GetEventsByStatus("PendingApproval");
                    dgEventList_Pending.ItemsSource = eventList;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.InnerException.Message);
            }
        }