  This article is the first in a series of three articles, the aim of which is
to study various correspondences between four enumerative theories associated
to a surface $S$: Gromov-Witten theory of $S^{[n]}$, orbifold Gromov-Witten
theory of $[S^{(n)}]$, relative Gromov-Witten theory of $S\times C$ for a nodal
curve $C$ and relative Donaldson-Thomas theory of $S\times C$. In this article,
we develop a theory of quasimaps to moduli spaces of sheaves on a surface.
Under some natural assumptions, we prove that moduli spaces of quasimaps are
proper and carry a perfect obstruction theory. Moreover, moduli spaces of
quasimaps are naturally isomorphic to relative moduli spaces of sheaves. Using
Zhou's theory of calibrated tails, we establish a wall-crossing formula which
relate Gromov-Witten theory of $S^{[n]}$ and relative Donaldson-Thomas theory
of $S\times C$. As an application, we prove that quantum cohomology of
$S^{[n]}$ is determined by relative Pandharipande-Thomas theory of $S\times
\mathbb{P}^1$, if $S$ is a del Pezzo surface, conjectured by Maulik.
