Ejemplo n.º 1
0
        static void DeleteTeacherAccount()
        {
            int    id;
            string idTry;

            while (true)
            {
                Console.WriteLine("Please Enter The ID Which You Want To Delete: ");
                idTry = Console.ReadLine();
                try
                {
                    id = Int32.Parse(idTry);
                    if (!itb.DeleteTeacherById(id))
                    {
                        Console.WriteLine("Delete Error, This ID Is Not Exists !");
                    }
                    else
                    {
                        Console.WriteLine("Delete Successful! ");
                    }
                    break;
                }
                catch (Exception e)
                {
                    Console.WriteLine("Please Enter a Number! ");
                    continue;
                    throw;
                }
            }
        }