Influence of contacts on the electron transport dynamics inside a mesoscopic system