Since you are posting this in the T1 forum I'm going to assume you're on insulin. The main thing you can do is INCREASE YOUR DOSES.
without knowing what kind of treatment you're on I really can't help you beyond that
All good suggestions. What is important is you do something. Do you mean you've stayed consistently in the 300s for a month? That's pretty dangerous. Do you check for ketones? You need to get those numbers down. I would suggest meeting with your health care provider as soon as you can. Do you tweak your own doses or do you rely on your doctor. I would see your doctor now to deal with this crisis. But after that I would work as described above to learn how to tweak your own doses so you don't go that long staying so high without increasing your insulin safely and effectively to bring those numbers back down.
Surgery is a major trauma and that is inflammation. Your body responds by raising your blood sugar. If you have been testing and correcting with your pump wizard and despite this, your blood sugar remain high this suggests that you need to make some adjustments. So hopefully you can work with your doctor to figure out some modifications to your insulin regime to address this.
Surgery can affect it, depending on what sort. Elevated BG can also complicate your healing from the surgery. You can work around that by taking more insulin. I agree with MegaMinX's suggestions for reading. Both of those books are excellent "owner's manuals" that can go a long way to sort of being your own doctor.
I'd also add that it may not be realistic to expect to fix "the problem" at a single appointment. It usually requires a lot of trial and error and keeping track of things a bit to get things "set up". Once they are set, it can become much more manageable.