private void AddItemCommandTask()
        {
            Console.Write("請輸入新物品ID(輸入cancel取消): ");
            int    itemID      = 0;
            string inputString = Console.ReadLine();

            if (inputString != "cancel")
            {
                while (inputString != "cancel" && (!int.TryParse(inputString, out itemID) || editingFactory.ContainsItem(itemID)))
                {
                    if (editingFactory.ContainsItem(itemID))
                    {
                        Console.Write("ID已存在 請輸入新物品ID(整數)(輸入cancel取消): ");
                    }
                    else
                    {
                        Console.Write("不合法的輸入 請輸入新物品ID(整數)(輸入cancel取消): ");
                    }
                    inputString = Console.ReadLine();
                }
                if (inputString != "cancel")
                {
                    Console.Write("請輸入物品名稱: ");
                    string itemName = Console.ReadLine();
                    editingFactory.AddItem(new Item(itemID, itemName));
                    ViewCommandTask();
                }
            }
        }