The water in the fuse box will at least confuse or at worst bugger up most of the electronics. You need a good stealer or indy to get to the bottom of this; and that is after you have got everything cleaned, dry, tight and electrically sound. Once all the boxes and their joints and earths are good the car will come right. Might need a reprogram though, because of the water over the terminals.
Good - Fast - Cheap: Pick any two.
E23 735i; E32 735iL (X 2 - 1 Alpine White and 1 Glacier Blue); E34 535i; E38 735iL; R50 Cooper; R55 Cooper Clubman.
E21 318i; E30 318i; E32 735iL; E34 535i; E38 730iL; E53 4.4i