/// <summary> /// Prints out all the actors in the Actors table of the database /// </summary> public static void GetActors() { List <Actor> actors = DALManager.GetActors(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Actors\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Actor item in actors) { Console.WriteLine(item.FirstName + " " + item.LastName); } Console.WriteLine(); }
/// <summary> /// Deletes an actor from the database with the usergiven name and prints out the new full list of actors /// </summary> /// <param name="search"></param> public static void DeleteActor(string search) { DALManager.DeleteActor(search); List <Actor> actors = DALManager.GetActors(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Updated list of Actors\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Actor item in actors) { Console.WriteLine(item.FirstName + " " + item.LastName); } Console.WriteLine(); }
/// <summary> /// Inserts the given first and last name as an actor in the database and prints the updated list of actors /// </summary> /// <param name="fn"></param> /// <param name="ln"></param> public static void InsertActor(String fn, string ln) { Actor a = new Actor(fn, ln); DALManager.InsertActor(a); List <Actor> actors = DALManager.GetActors(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Updated list of Actors\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Actor item in actors) { Console.WriteLine(item.FirstName + " " + item.LastName); } Console.WriteLine(); }