예제 #1
0
        private Owner GetAssetOwner()
        {
            Owner owner = null;

            // attempts to get a valid owner id
            for (int i = 0; i < Retries; i++)
            {
                int ownerId = ReadInt("Please input asset owner id:");
                owner = manager.FindOwnerById(ownerId);

                if (owner == null)
                {
                    Console.WriteLine("Owner not found");
                    if (i == 2)
                    {
                        return(null);
                    }
                }
                else
                {
                    break;
                }
            }

            return(owner);
        }