public void CheckList(Tour tour)
 {
     Messenger.Default.Send<Tour, CheckListViewModel>(tour);
     navigationService.NavigateTo("CheckList");
 }
 private void SetTour(Tour tour)
 {
     if (tour != null)
     {
         Tour = tour;
         this.CurrentMode = Mode.EditTour;
         if (Tour.AppType != null)
             SelectedAppType = AppTypeList.IndexOf(Tour.AppType.Value);
         SelectedEstateType = EstateTypeList.IndexOf(Tour.EstateType);
     }
     else
     {
         Tour = new Tour();
         Tour.Type = TourType.Rent;
         SelectedIndexPivot = 0;
         Tour.Date = DateTime.Now;
         this.CurrentMode = Mode.NewTour;
         SelectedAppType = 0;
         SelectedEstateType = 0;
     }
     IsFormValid = false;
     EditableObject = new Caretaker<Tour>(this.Tour);
     EditableObject.BeginEdit();
 }
 public void AddEditTour(Tour tour)
 {
     Messenger.Default.Send<Tour, AddEditTourViewModel>(tour);
     navigationService.NavigateTo("NewTour");
 }
 public void RefreshTour(Tour tour)
 {
     DiscardPendingChanges(db.nearBy.Context);
     DiscardPendingChanges(db.picturesTour.Context);
     DiscardPendingChanges(db.repairs.Context);
 }