Turaev (J. Geom. Phys. 57: 2419-2430, 2007) proves a formula for the Dijkgraaf-Witten invariants of surfaces in terms of projective representations by using the state sum invariant technique from quantum topology. In Khoi (J. Knot Theory Ramif. 20: 837-846,2011), the author gives another proof of Turaev's theorem by using classical method of characters and representation theory. The purpose of this paper is to prove a formula for the Dijkgraaf-Witten invariants of a circle bundle over a surface by using techniques from Khoi (J. Knot Theory Ramif. 20: 837-846,2011).