private static void LookUpPetName(InventoryDAL dal) { Console.WriteLine("Enter Id car to look up:"); int carId = int.Parse(Console.ReadLine()); string petName = dal.LookUpPetName(carId); if (petName.Length > 0) Console.WriteLine("PetName of {0} is {1}", carId, petName); else Console.WriteLine("PetName of {0} is not exists", carId); }
private static void LookupPetName(InventoryDAL invDAL) { Console.Write("Enter ID of Car to Lookup: "); int id = int.Parse(Console.ReadLine()); Console.WriteLine("Petname of {0} is {1}.", id, invDAL.LookUpPetName(id).TrimEnd()); }