Method of integral transforms for calculating (e,e') and (e,e'N) reactions