public ActionResult Index(Dog searchDog)
        {
            //Create new database(this seems pretty inefficient)
            DatabaseManager db = new DatabaseManager();

            //Ask database for a dog based on the details provided from the user
            Dog suggestedDog = db.suggestDog(searchDog);

            //Display results to user
            return View("Suggestion", suggestedDog);
        }
Пример #2
0
        public ActionResult SelectedDog(EScale activityLevel, EScale sheddingLevel, EScale groomingLevel, EScale intelligenceLevel, ELength coatlength, ESize size, bool goodWithChildren, bool drools)
        {
            DatabaseManager dbm = new DatabaseManager();
            db = dbm.makeDatabase();

            Dog nDog = new Dog();
            nDog.ActivityLevel = activityLevel;
            nDog.SheddingLevel = sheddingLevel;
            nDog.GroomingLevel = groomingLevel;
            nDog.IntelligenceLevel = intelligenceLevel;
            nDog.Coatlength = coatlength;
            nDog.Size = size;
            nDog.GoodWithChildren = goodWithChildren;
            nDog.Drools = drools;

            nDog.BreedName = db[0].BreedName;
            nDog.ImageName = db[0].ImageName;
            nDog.DisplayName = db[0].DisplayName;

            Dog recommendation = dbm.FindRecommodation(db, nDog);

            return View(recommendation);
        }