/// <summary>
        /// Displays the event bookings data.
        /// </summary>
        private void DisplayEventBookingsData()
        {
            try
            {
                List <EventBookings> eventBookingList = eventBookingManager.GetEventBookingList();
                grdEventBookingList.ItemsSource = eventBookingList;

                List <EventType> eventTypeList = eventBookingManager.GetEventTypeList();
                cmbEventName.ItemsSource = eventTypeList;


                List <Venue> venueList = eventBookingManager.GetVenueList();
                cmbVenue.ItemsSource = venueList;

                List <Caterers> caterersList = eventBookingManager.GetCaterersList();
                cmbCaterers.ItemsSource = caterersList;

                List <Customer> customerList = customerManager.GetCustomerList();
                cmbCustomer.ItemsSource = customerList;

                ((MainWindow)System.Windows.Application.Current.Windows[1]).grdEventBookingList.ItemsSource = eventBookingList;
            }
            catch (Exception ex)
            {
                lblMessage.Content = ex.Message;
            }
        }
Esempio n. 2
0
        //
        // GET: /EventBooking/Details/5

        public ActionResult Details(int id)
        {
            EventBookingsO        eventBookingO = eventBookingMnger.GetEventBookingOnBookingId(id);
            EventBookingViewModel modelObj      = new EventBookingViewModel();

            modelObj.BookingID = id;
            modelObj.EventType = eventBookingMnger.GetEventTypeList();
            modelObj.EventID   = eventBookingO.EventTypeID;


            modelObj.StartTime = eventBookingO.StartTime;
            modelObj.EndTime   = eventBookingO.EndTime;
            modelObj.EventDate = eventBookingO.EventDate;
            modelObj.Venue     = eventBookingMnger.GetVenueList();
            modelObj.VenueID   = eventBookingO.VenueID;

            modelObj.Caterer    = eventBookingMnger.GetCaterersList();
            modelObj.CatererID  = eventBookingO.CaterersID;
            modelObj.Customer   = customerManager.GetCustomerList();
            modelObj.CustomerID = eventBookingO.CustomerID;
            return(View(modelObj));
        }