We investigate the cooperation dynamics attributed to the interplay between the evolution of individual strategies and evolution of individual partnerships. We focus on the effect of reputation on an individual's partner-switching process. We assume that individuals can either change their strategies by imitating their partners or adjust their partnerships based on local information about reputations. We manipulate the partner switching in two ways; that is, individuals can switch from the lowest reputation partners, either to their partners' partners who have the highest reputation (i.e., ordering in partnership) or to others randomly chosen from the entire population (i.e., randomness in partnership). We show that when individuals are able to alter their behavioral strategies and their social interaction partnerships on the basis of reputation, cooperation can prevail. We find that the larger temptation to defect and the denser the partner network, the more frequently individuals need to shift their partnerships in order for cooperation to thrive. Furthermore, an increasing tendency of switching to partners' partners is more likely to lead to a higher level of cooperation. We show that when reputation is absent in such partner-switching processes, cooperation is much less favored than that of the reputation involved. Moreover, we investigate the effect of discounting an individual's reputation on the evolution of cooperation. Our results highlight the importance of the consideration of reputation (indirect reciprocity) on the promotion of cooperation when individuals can adjust their partnerships.