  We consider the isomonodromy problems for flat $G$-bundles over punctured
elliptic curves $\Sigma_\tau$ with regular singularities of connections at
marked points. The bundles are classified by their characteristic classes.
These classes are elements of the second cohomology group
$H^2(\Sigma_\tau,{\mathcal Z}(G))$, where ${\mathcal Z}(G)$ is the center of
$G$. For any complex simple Lie group $G$ and arbitrary class we define the
moduli space of flat bundles, and in this way construct the monodromy
preserving equations in the Hamiltonian form and their Lax representations. In
particular, they include the Painlev\'e VI equation, its multicomponent
generalizations and elliptic Schlesinger equations. The general construction is
described for punctured curves of arbitrary genus. We extend the
Drinfeld-Simpson (double coset) description of the moduli space of Higgs
bundles to the case of flat connections. This local description allows us to
establish the Symplectic Hecke Correspondence for a wide class of the monodromy
preserving equations classified by characteristic classes of underlying
bundles. In particular, the Painlev\'e VI equation can be described in terms of
${\rm SL}(2, {\mathbb C})$-bundles. Since ${\mathcal Z}({\rm SL}(2, {\mathbb
C}))= {\mathbb Z}_2$, the Painlev\'e VI has two representations related by the
Hecke transformation: 1) as the well-known elliptic form of the Painlev\'e
VI(for trivial bundles); 2) as the non-autonomous Zhukovsky-Volterra gyrostat
(for non-trivial bundles).
