private void btnAddFrontDesk_Click(object sender, RoutedEventArgs e)
 {
     if (tabBellHopService.IsSelected)
     {
         var frmAdd = new AddLuggage(luggageManager, guestManager);
         if (frmAdd.ShowDialog() == true)
         {
             MessageBox.Show("Luggage Added.");
             setupWindow();
         }
     }
     /// <summary>
     /// Author: Dalton Cleveland
     /// Created : 3/27/2019
     /// The function which runs when Add is clicked
     /// </summary>
     else if (tabHousekeepingService.IsSelected)
     {
         var createHouseKeepingRequest = new CreateHouseKeepingRequest(_houseKeepingRequestManager);
         createHouseKeepingRequest.ShowDialog();
         refreshAllHouseKeepingRequests();
         populateHouseKeepingRequests();
     }
     return;
 }
 private void btnUpdateFrontDesk_Click(object sender, RoutedEventArgs e)
 {
     if (tabBellHopService.IsSelected)
     {
         try
         {
             DataGridRow  row       = (DataGridRow)dgLuggage.ItemContainerGenerator.ContainerFromIndex(dgLuggage.SelectedIndex);
             DataGridCell RowColumn = dgLuggage.Columns[0].GetCellContent(row).Parent as DataGridCell;
             openView(luggageManager.RetrieveLuggageByID(int.Parse(((TextBlock)RowColumn.Content).Text)));
         }
         catch (ArgumentOutOfRangeException)
         {
             MessageBox.Show("You must select a guest before editing.");
         }
         catch (IndexOutOfRangeException)
         {
             MessageBox.Show("You must select a guest before editing.");
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     /// <summary>
     /// Author: Dalton Cleveland
     /// Created : 3/27/2019
     /// The function which runs when the view HouseKeepingRequest button is clicked.
     /// It will launch the CreateHouseKeepingRequest window in view mode with the option of updating
     /// </summary>
     else if (tabHousekeepingService.IsSelected)
     {
         if (dgHouseKeepingRequests.SelectedIndex != -1)
         {
             HouseKeepingRequest selectedHouseKeepingRequest = new HouseKeepingRequest();
             try
             {
                 selectedHouseKeepingRequest = _houseKeepingRequestManager.RetrieveHouseKeepingRequest(((HouseKeepingRequest)dgHouseKeepingRequests.SelectedItem).HouseKeepingRequestID);
                 var readUpdateHouseKeepingRequest = new CreateHouseKeepingRequest(selectedHouseKeepingRequest, _houseKeepingRequestManager);
                 readUpdateHouseKeepingRequest.ShowDialog();
                 refreshAllHouseKeepingRequests();
                 populateHouseKeepingRequests();
             }
             catch (Exception ex)
             {
                 MessageBox.Show("Unable to find that HouseKeepingRequest\n" + ex.Message);
             }
         }
     }
 }
 /// <summary>
 /// Author: Dalton Cleveland
 /// Created : 3/27/2019
 /// The function which runs when a HouseKeepingRequest is double clicked
 /// </summary>
 private void dgHouseKeepingRequests_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dgHouseKeepingRequests.SelectedIndex != -1)
     {
         HouseKeepingRequest selectedHouseKeepingRequest = new HouseKeepingRequest();
         try
         {
             selectedHouseKeepingRequest = _houseKeepingRequestManager.RetrieveHouseKeepingRequest(((HouseKeepingRequest)dgHouseKeepingRequests.SelectedItem).HouseKeepingRequestID);
             var readUpdateHouseKeepingRequest = new CreateHouseKeepingRequest(selectedHouseKeepingRequest, _houseKeepingRequestManager);
             readUpdateHouseKeepingRequest.ShowDialog();
             refreshAllHouseKeepingRequests();
             populateHouseKeepingRequests();
         }
         catch (Exception ex)
         {
             MessageBox.Show("Unable to find that HouseKeepingRequest\n" + ex.Message);
         }
     }
 }