If the battery is not charging and the laptop powers off when plugged in, it is most likely an issue with the power cord or DC jack. Remember: Laptops do not convert AC->DC. The power is converted by the power cord before reaching the laptop's DC jack.
A DC connector (or DC plug, for one common type of connector) is an electrical connector for supplying direct current (DC) power.
Compared to domestic AC power plugs and sockets, DC connectors have many more standard types that are not interchangeable. The dimensions and arrangement of DC connectors can be chosen to prevent accidental interconnection of incompatible sources and loads. Types vary from small coaxial connectors used to power portable electronic devices from AC adapters, to …