public void Show(Entity.Task task) { while (true) { TimeLogCommentManagerEnum choice = RenderMenuTaskOptions(); try { switch (choice) { case TimeLogCommentManagerEnum.SelectTimeLog: { GetAll(); break; } case TimeLogCommentManagerEnum.ViewTimeLog: { //View(); break; } case TimeLogCommentManagerEnum.InsertTimeLog: { Add(task); break; } case TimeLogCommentManagerEnum.UpdateTimeLog: { // Update(); break; } case TimeLogCommentManagerEnum.DeleteTimeLog: { // Delete(); break; } case TimeLogCommentManagerEnum.Exit: { TaskManagerView taskView = new TaskManagerView(); taskView.Show(); return; } } } catch (Exception ex) { Console.Clear(); Console.WriteLine(ex.Message); Console.ReadKey(true); } } }
public void Show() { while (true) { Console.Clear(); while (true) { Console.Clear(); Console.WriteLine("Administration View:"); Console.WriteLine("[U]ser Management"); Console.WriteLine("[T]asks Management"); Console.WriteLine("E[x]it"); string choice = Console.ReadLine(); switch (choice.ToUpper()) { case "U": { UserManagerView view = new UserManagerView(); view.Show(); break; } case "T": { TaskManagerView view = new TaskManagerView(); view.Show(); break; } case "X": { return; } default: { Console.WriteLine("Invalid choice."); Console.ReadKey(true); break; } } } } }