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); } }
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); } }
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); } }
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); } }
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); } }