Esempio n. 1
0
        /// <summary>
        /// Allows admin user to add a new category
        /// </summary>
        /// <param name="adminId"></param>
        private void AddCategory(int adminId)
        {
            AdminView.AddCategoryPage();
            var genere = Console.ReadLine();

            if (genere != "")
            {
                WebbShopAPI api    = new WebbShopAPI();
                var         result = api.AddCategory(adminId, genere);
                if (result)
                {
                    MessageViews.DisplaySuccessMessage();
                    return;
                }
            }

            MessageViews.DisplayErrorMessage();
        }