public AccomodationViewModel()
 {
     Singleton = AccommodationCatalogSingleton.GetInstance();
     //Retrieve the object instance from the Global Instance
     Country           = Singleton.GetCountry();
     City              = Singleton.GetCity();
     ImageUrl          = Singleton.GetImageUrl();
     Price             = Singleton.GetPrice();
     GoMainPageCommand = new RelayCommand(GoMainPage);
 }
示例#2
0
        public BookingPageViewModel()
        {
            BookingsList             = DataCollection.BookingsCollection();
            _bookingCatalogSingleton = BookingCatalogSingleton.Instance;
            Singleton                = AccommodationCatalogSingleton.GetInstance();
            GoMainPageCommand        = new RelayCommand(GoMainPage);
            BookAccommodationCommand = new RelayCommand(Book);
            //bookingsCollection = new ObservableCollection<Booking>(BookingCatalogSingleton.BookingsList);

            Country  = Singleton.GetCountry();
            City     = Singleton.GetCity();
            ImageUrl = Singleton.GetImageUrl();
            Price    = Singleton.GetPrice();
            //AddBooking = new Booking(32, new DateTime(2013, 1, 14), new DateTime(2013, 1, 18));
            _startDate = new DateTimeOffset(DateTime.Today);
            _endDate   = new DateTimeOffset(DateTime.Today);
        }