/// <summary> /// Initializes a new instance of the <see cref="TourMainViewModel"/> class. /// constructor for tour viewmodel /// </summary> /// <param name="tourRepo"> tourrepository</param> /// <param name="placeRepo">place repository</param> /// <param name="pltconRepo">pltcon repository</param> /// <param name="programRepo">propgram repository</param> /// <param name="prtconRepo">prtcon repository</param> /// <param name="tourguideRepo">tourguide repository</param> public TourMainViewModel( IRepository <Tour> tourRepo, IRepository <Place> placeRepo, IRepository <PLTCON> pltconRepo, IRepository <Program> programRepo, IRepository <PRTCON> prtconRepo, IRepository <Tourguide> tourguideRepo) { this.CreateCountryList(); this.tourBL = new TourBL(tourRepo, programRepo, placeRepo, pltconRepo, prtconRepo); this.tourguideBL = new TourguideBL(tourguideRepo); this.searchCategories = new List <string>(); foreach (TourTerms item in Enum.GetValues(typeof(TourTerms))) { this.searchCategories.Add(item.ToString()); } this.PlaceListAll = new ObservableCollection <Place>(); this.programListAll = new ObservableCollection <Program>(); this.TourGuideList = new ObservableCollection <Tourguide>(); this.TourPlaceList = new ObservableCollection <Place>(); this.TourProgramList = new ObservableCollection <Program>(); this.GetAllPlaces(); this.GetAllPrograms(); this.GetAllTourGuides(); }
public TourguideBLTest() { CreateTestdataArrays(); tourguideRepository = new FakeRepository <Tourguide>(tourguides); onHolidayRepository = new FakeRepository <OnHoliday>(onholidays); languageRepository = new FakeRepository <Language>(languages); bl = new TourguideBL(tourguideRepository, languageRepository, onHolidayRepository); }
/// <summary> /// Initializes a new instance of the <see cref="TourGuideMainViewModel"/> class. /// constructor for Tourguide view model /// </summary> /// <param name="tourGuideRepo">tourGuideRepo</param> /// <param name="languageRepo">languageRepo</param> /// <param name="holidayRepo">holidayRepo</param> public TourGuideMainViewModel( IRepository <Tourguide> tourGuideRepo, IRepository <Language> languageRepo, IRepository <OnHoliday> holidayRepo) { this.tgBL = new TourguideBL(tourGuideRepo, languageRepo, holidayRepo); this.CreateCountryList(); this.LanguageList = new List <string>(); this.LanguageList.Add("english"); this.LanguageList.Add("german"); this.LanguageList.Add("french"); this.LanguageList.Add("spanish"); this.LanguageList.Add("italian"); this.LanguageList.Add("dutch"); this.LanguageList.Add("chinese"); this.LanguageList.Add("japanese"); this.searchCategories = new List <string>(); foreach (TourguideTerms item in Enum.GetValues(typeof(TourguideTerms))) { this.searchCategories.Add(item.ToString()); } }