Example #1
0
 private static void UpdateCarPetName(int carId)
 {
     Console.WriteLine("***Car updating***");
     Console.WriteLine($"Last pet name: {Dal.LookUpPetName(carId)}");
     Dal.UpdateCarPetName(carId, $"{Dal.GetCar(carId)?.PetName}_new");
     InitCars();
     Console.WriteLine($"New pet name: {Dal.LookUpPetName(carId)}");
     Console.WriteLine("*********************");
 }
Example #2
0
        private static void UpdateCarPetName(InventoryDal inventory)
        {
            Console.Write("Enter Car ID: ");
            var carId = int.Parse(Console.ReadLine() ?? "0");

            Console.Write("Enter New Pet Name: ");
            var newCarPetName = Console.ReadLine();

            inventory.UpdateCarPetName(carId, newCarPetName);
        }
Example #3
0
        private static void UpdateCarPetName(InventoryDal invDal)
        {
            int    carID;
            string newCarPetName;

            Console.Write("Enter Car ID: ");
            carID = int.Parse(Console.ReadLine());
            Console.Write("Enter New Pet Name: ");
            newCarPetName = Console.ReadLine();

            invDal.UpdateCarPetName(carID, newCarPetName);
        }