Пример #1
0
        private void LoadUserTour()
        {
            ObservableCollection <Tour> tours = new ObservableCollection <Tour>();

            int user_id = (int)Application.Current.Resources["user_id"];
            var tour    = TourService.GetToursByID(user_id);

            foreach (var t in tour)
            {
                tours.Add(new Tour
                {
                    TourID      = t.TourID,
                    Name        = t.Name,
                    Description = t.Description,
                    Price       = t.Price,
                    Date        = t.Date,
                });
            }

            UserTour = tours;
        }