示例#1
0
        private void RemoveLanguage()
        {
            string language    = CLIHelper.GetString("Which language should be removed:");
            string countryCode = CLIHelper.GetString("For which country code:");

            Language lang = new Language
            {
                CountryCode = countryCode,
                Name        = language
            };

            try
            {
                languageDAO.RemoveLanguage(lang);
                Console.WriteLine("Success!");
            }
            catch (Exception)
            {
                Console.WriteLine("The language was not found or removed.");
            }
        }
示例#2
0
        private void RemoveLanguage()
        {
            string language    = CLIHelper.GetString("Which language should be removed:");
            string countryCode = CLIHelper.GetString("For which country code:");

            Language lang = new Language
            {
                CountryCode = countryCode,
                Name        = language
            };

            bool result = languageDAO.RemoveLanguage(lang);

            if (result)
            {
                Console.WriteLine("Success!");
            }
            else
            {
                Console.WriteLine("The language was not found or removed.");
            }
        }