Double magnetic transition and anomalous magnetoresistance in Er2Ni3Si5