private void AddOperation() { switch (view.entity) { case Entity.Room: Room room = view.RoomAddOrUpdateEnter(); roomDAO.Create(room); break; case Entity.Guest: Guest guest = view.GuestAddOrUpdateEnter(); guestDAO.Create(guest); break; case Entity.Booking: Booking booking = view.BookingAddOrUpdate(); bookingDAO.Create(booking); break; } view.Success(); }