If it is working with dc does that mean the transformer is good?
No, the transformer has nothing to do with DC operation so it would be presumptive to make that conclusion. The most likely culprit is simply that the AC/DC switch (if it has one -- most boomboxes do and the circuit diagram is showing one) has corrosion resulting in poor connection, happens all the time. The AC/DC switch is there to isolate those 2 power sources. This switch is behind a tab that gets pushed in when the AC cord is inserted into the socket (boombox end). If you take a peek in the socket, you should be able to see this tab, will be on one side. That switch should be thoroughly cleaned with deoxidizing cleaner. If you get even a hint that it is working after a cleaning, that almost certainly confirms it as the culprit. Further cleaning or if necessary, removal and disassembly may be necessary to properly service it.
Others have mentioned a fuse, it is shown in the schematic of the PS that fyj2972 posted. That schematic has japanese text which suggests it may be for a Japanese variant of the M9994. Therefore, I can't say for sure if yours has it, but in your photo, there is what looks like a large resistor-looking component connecting from the board to the block behind the AC socket. This component I'm guessing is the fuse.
Lastly, the only way to know for sure if your transformer is good is to test the coils. Both primary and secondary coils needs to have continuity and that is how you need to test it. If you don't have a meter and can't do testing, there is a limit to what anyone can do to help except guess. I will say that I have replaced a blown transformer on at least 1 M9994 so I can confirm that it's possible for them to blow.