public void ReturnAllParksInData() { ParkSqlDAL testPark = new ParkSqlDAL(connectionString); List <Park> testList = testPark.AllParks(); Assert.AreEqual(4, testList.Count); }
public void DisplayNameOfParks() { ParkSqlDAL dal = new ParkSqlDAL(connectionString); List <Park> park = dal.AllParks(); int i = 1; foreach (Park parks in park) { Console.WriteLine(i.ToString() + ")".PadRight(3) + parks.Name); i++; } }
public void Run() { bool isDone = false; do { Console.WriteLine(); Console.WriteLine("Select a Park for Further Details"); ParkSqlDAL dal = new ParkSqlDAL(connectionString); List <Park> park = dal.AllParks(); int i = 1; foreach (Park parks in park) { Console.WriteLine(i.ToString() + ")".PadRight(3) + parks.Name); i++; } DisplayParksInterface(); string input = Console.ReadLine(); if (int.Parse(input) == 9) { Console.WriteLine("Please come back soon!"); isDone = true; } else if (int.Parse(input) > 0 && int.Parse(input) < i) { ParksInformation(input); } else { Console.WriteLine("Make a valid selection"); } }while (!isDone); }