/// <summary>
 /// Command for editing reservation
 /// </summary>
 /// <param name="parameter">command parameter</param>
 private void ExecuteEditReservationCommand(object parameter)
 {
     if (this.SelectedReservationModel == null)
     {
         MessageBox.Show(Resource.SelectReservationToEditMsg);
         return;
     }
     if (CheckIfXMLPathsHaveBeenSet())
     {
         try
         {
             ReservationsView      reservationsView = ((UnityContainer)ServiceLocator.Current.GetInstance <IUnityContainer>()).Resolve <ReservationsView>();
             ReservationsViewModel reservationsVM   = (ReservationsViewModel)reservationsView.DataContext;
             reservationsVM.IsEditReservation        = true;
             reservationsVM.ReservationsView         = reservationsView;
             reservationsVM.SelectedReservationModel = this.SelectedReservationModel;
             reservationsVM.LoadEditReservation();
             reservationsView.ShowDialog();
         }
         catch (Exception ex)
         {
             MessageBox.Show(Resource.TableLoadingErrorMsg);
         }
     }
     else
     {
         MessageBox.Show(Resource.SelectXMLFilePathsMsg);
     }
 }
        /// <summary>
        /// Command for Deleting reservation
        /// </summary>
        /// <param name="parameter">command paramter</param>
        private void ExecuteDeleteReservationCommand(object parameter)
        {
            if (this.SelectedReservationModel == null)
            {
                MessageBox.Show(Resource.SelectReservationToDeleteMsg);
                return;
            }
            ReservationsView      reservationsView = ((UnityContainer)ServiceLocator.Current.GetInstance <IUnityContainer>()).Resolve <ReservationsView>();
            ReservationsViewModel reservationsVM   = (ReservationsViewModel)reservationsView.DataContext;

            reservationsVM.SelectedReservationModel = this.SelectedReservationModel;
            reservationsVM.DeleteReservation();
        }
 /// <summary>
 /// Command to add new reservation
 /// </summary>
 /// <param name="parameter">command parameter</param>
 private void ExecuteNewReservationCommand(object parameter)
 {
     if (CheckIfXMLPathsHaveBeenSet())
     {
         try
         {
             ReservationsView      reservationsView = ((UnityContainer)ServiceLocator.Current.GetInstance <IUnityContainer>()).Resolve <ReservationsView>();
             ReservationsViewModel reservationsVM   = reservationsView.DataContext as ReservationsViewModel;
             reservationsVM.IsAddNewReservation = true;
             reservationsVM.ReservationsView    = reservationsView;
             reservationsView.ShowDialog();
         }
         catch (Exception ex)
         {
             MessageBox.Show(Resource.TableLoadingErrorMsg);
         }
     }
     else
     {
         MessageBox.Show(Resource.SelectXMLFilePathsMsg);
     }
 }