Beispiel #1
0
 /// <summary>
 /// Miguel Santana
 /// Created 2015/04/04
 /// Retrieves the latest information from the bll
 /// </summary>
 private void RefreshData()
 {
     try
     {
         _eventmanager.RetrieveEventList();
         ListingList = _productManager.RetrieveItemListingList();
         foreach (ItemListing item in ListingList)
         {
             item.Seats = (item.MaxNumGuests - item.CurrentNumGuests);
         }
         LvListing.ItemsSource = ListingList;
     }
     catch (Exception ex)
     {
         throw new WanderingTurtleException(this, ex, "No database able to be accessed for Listings");
     }
 }
Beispiel #2
0
        /// <summary>
        /// Hunter Lind
        /// Created:  2015/2/23
        /// Refreshes our Listview, a handy method instead of having to re-type code.
        /// </summary>
        private void Refresh()
        {
            LvEvents.ItemsPanel.LoadContent();

            try
            {
                _myEventList = _myEventManager.RetrieveEventList();
                foreach (Event x in _myEventList)
                {
                    x.setFields();
                }
                LvEvents.ItemsSource = _myEventList;
                LvEvents.Items.Refresh();
            }
            catch (Exception ex)
            {
                LvEvents.ItemsSource = "";
                throw new WanderingTurtleException(this, "Create an event or contact your Systems Administrator", "No data to display from the database.", ex);
            }
        }