12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.Extensions.Logging;
- using ReactiveUI;
- using TourAgent.Models;
- using TourAgent.Views;
- namespace TourAgent.ViewModels
- {
- public class ToursViewModel : ReactiveObject
- {
- UP_SmirnovContext DB = new UP_SmirnovContext();
- private List<Tour>? _tours;
- public List<Tour>? Tours { get => _tours; set => this.RaiseAndSetIfChanged(ref _tours, value); }
- private List<string>? _types;
- public List<string>? Types { get => _types; set => this.RaiseAndSetIfChanged(ref _types, value); }
- private bool _checkOrNot = false;
- public bool CheckOrNot
- {
- get => _checkOrNot;
- set
- {
- _checkOrNot = value;
- Filter();
- }
- }
- private string? _findTour;
- public string? FindTour
- {
- get => _findTour;
- set
- {
- _findTour = value;
- Filter();
- }
- }
- public ToursViewModel()
- {
- Tours = DB.Tours.ToList();
- Types = DB.Types.Select(x=>x.Name).ToList();
- Types.Insert(0, "Âñå");
- }
- public void Filter()
- {
- }
- }
- }
|