Discrete Gauge Theory: From Lattices to Tqft