Example #1
0
        public static void TesteDeleteDepartamento(string sigla)
        {
            Departamento d = new Departamento();

            d = DeleteFunctions.DeleteDepartamento(sigla);
            Console.WriteLine("Departamento " + d.Sigla + "\t" + d.Descricao + "deleted");
        }
Example #2
0
        // Delete Departamento
        public static int D1()
        {
            Console.WriteLine("Delete Departamento");
            Console.Write("Sigla? = ");
            var          sigla = Console.ReadLine();
            Departamento ans;

            ans = DeleteFunctions.DeleteDepartamento(sigla);
            if (ans == null)
            {
                Console.WriteLine("Departamento {0} was deleted.", sigla);

                return(0);
            }
            else
            {
                Console.WriteLine("An error has ocurred. Departamento wasn't deleted.");
                return(-1);
            }
        }