private void GetOperation() { int id = -1; while (id < 0) { id = view.EnterId(); } switch (view.entity) { case Entity.Room: List <Room> r_table = new List <Room>() { roomDAO.Get(id) }; view.PrintTable(view.Rooms_table(r_table)); break; case Entity.Guest: List <Guest> g_table = new List <Guest>() { guestDAO.Get(id) }; view.PrintTable(view.Guests_table(g_table)); break; case Entity.Booking: List <Booking> b_table = new List <Booking>() { bookingDAO.Get(id) }; view.PrintTable(view.Booking_table(b_table)); break; } view.Success(); }