Electronic states and magnetoresistance in multilayers