Well, the licensing idea with windows 10 upgrades (from 7 and 8) goes like this,
you install it from within windows as upgrade (and it looks up your license key) and activates win10 automatically.
OR
you install it from download tool and create bootable dvd/usb and enter old win7/8 license when asked.
both options will tie said old license key to the motherboard at time of install. (only exception is if 7/8 was retail, in which case you might be able to reinstall 10 with said key on new motherboard)
thus.. after motherboard swap, said license is 99% likely invalid (most people tend to buy cheaper OEM licenses which is what pre-built computers also have) and your only option would be to call microsoft (activate through phone, windows will tell you the phone numbers) and explain the situation and see if they are feeling merciful.
so.. try with original win7/8 license key, if it wont work, call MS, if it wont work.. buy new windows license.