示例#1
0
        private ClientCard getVehicleFromUser()
        {
            bool       success        = false;
            string     licenceNumber  = string.Empty;
            ClientCard currentVehicle = null;

            while (!success)
            {
                try
                {
                    licenceNumber  = m_UI.GetLicenceNumber();
                    currentVehicle = m_Garage.FindByLicenceNum(licenceNumber);
                    success        = true;
                }
                catch (Exception ex)
                {
                    m_UI.Print(ex.Message);
                }
            }

            return(currentVehicle);
        }