コード例 #1
0
        private async Task _editBooking(SumUpViewModel sumUpVM)
        {
            try
            {
                LinkedListNode <INavigableViewModel> prevNode = _navigation.Find(sumUpVM);
                BookingViewModel bookingVM = await BookingViewModel.LoadAsync(_navigation, _booking, prevNode);

                NextCalled?.Invoke(this, sumUpVM);
            } catch (Exception ex)
            {
                Logger.Log(ex);
            }
        }
コード例 #2
0
ファイル: BookingViewModel.cs プロジェクト: yves982/Resotel
        private async Task _validateBooking(BookingViewModel bookingVM)
        {
            try
            {
                await _roomChoices.AssignRoomsCommand.ExecuteAsync(_booking);

                LinkedListNode <INavigableViewModel> prevNode = _navigation.Find(this);
                SumUpViewModel sumUpVM = new SumUpViewModel(_navigation, _booking, prevNode);
                NextCalled?.Invoke(null, this);
            }
            catch (Exception ex)
            {
                Logger.Log(ex);
            }
        }
コード例 #3
0
ファイル: BookingViewModel.cs プロジェクト: yves982/Resotel
        private async void _searchClient_clientSelected(object sender, ClientEntity selectedClientEntity)
        {
            try
            {
                (sender as SearchClientsViewModel).ClientSelected -= _searchClient_clientSelected;
                _booking.Client = selectedClientEntity.Client;
                await _roomChoices.AssignRoomsCommand.ExecuteAsync(_booking);

                LinkedListNode <INavigableViewModel> prevNode = _navigation.Find(this);
                SumUpViewModel sumUpVM = new SumUpViewModel(_navigation, _booking, prevNode);
                NextCalled?.Invoke(null, this);
            }
            catch (Exception ex)
            {
                Logger.Log(ex);
            }
        }
コード例 #4
0
ファイル: ClientViewModel.cs プロジェクト: yves982/Resotel
 private void _sumUp(ClientViewModel clientVM)
 {
     try
     {
         int     bookingCnt = clientVM.ClientEntity.Bookings.Count;
         Booking booking    = clientVM.CurrentBookingVM.Booking;
         if (!(_navigation.Last.Value is SumUpViewModel))
         {
             LinkedListNode <INavigableViewModel> prevNode = _navigation.Find(this);
             SumUpViewModel sumUpVM = new SumUpViewModel(_navigation, clientVM.CurrentBookingVM.Booking, prevNode);
         }
         NextCalled?.Invoke(null, clientVM);
     }
     catch (Exception ex)
     {
         Logger.Log(ex);
     }
 }
コード例 #5
0
ファイル: BookingViewModel.cs プロジェクト: yves982/Resotel
        private async Task _newClient(BookingViewModel bookingVM)
        {
            try
            {
                LinkedListNode <INavigableViewModel> prevNode = _navigation.Find(bookingVM);
                ClientViewModel clientVM = new ClientViewModel(_navigation, _clientEntity, prevNode);
                await _roomChoices.AssignRoomsCommand.ExecuteAsync(_booking);

                bool success = _checkRoomCapacityWithBabies(bookingVM);
                if (success)
                {
                    NextCalled?.Invoke(null, bookingVM);
                }
            }
            catch (Exception ex)
            {
                Logger.Log(ex);
            }
        }