Schr\"{o}dinger particle in magnetic and electric fields in Lobachevsky and Riemann spaces