We report on comparative study of magnetic phase diagram and critical current of the hole- and electron-doped BaFe2As2 single crystals with close values of superconducting critical temperature, T-c, (slightly underdoped Ba0.64K0.36Fe2As2 with T-c=25K and optimally doped BaFe1.9Ni0.1As2 with T-c=20K) obtained from measurements of the temperature dependence of ac-susceptibility and isothermal irreversible magnetization loops, M(H), in magnetic fields parallel to the c-axis of the crystal. From ac-susceptibility measurements we get estimation of a slope of the upper critical field, H-c2 in dependence on temperature, dH(c2)/dT approximate to -4.2T/K for BaFe1.9Ni0.1As2 single crystal and H-c2/dT approximate to -1.75T/K for Ba0.64K0.36Fe2As2 sample that in accordance with Werthamer, Helfand, and Hohenberg (WHH) model gives H-c2(0) = 0.69T(c),((dH(c2))dT) approximate to 56T for BaFe(1.9)Ni(0.1)AS(2) sample and lower value of H-c2(0) approximate to 31T for Ba0.64K0.36Fe2As2 crystal. However, obtained from M(H) measurements temperature dependence of the irreversibility field, H-irr(T), for BaFe1.9Ni0.1As2 crystal located below the one forBa(0.64)K(0.36)Fe(2)As(2) crystal. Furthermore, at T=4.2K and higher temperatures our results for critical current density, J(c) calculated from M(H) curves clearly show slower reduction of with increasing field in even underdoped Ba0.64K0.36Fe2As2 sample compared to optimally doped BaFe1.9Ni0.1As2 crystal demonstrating higher capacity of K-doped 122 compounds for production of superconducting cables and wires with high critical current in strong magnetic fields.