正確流程是:當所在單位的文本框失去焦點時會查到該單位的id然後後台獲取這個id,
但現在有這樣一種情況,文本框還沒有失去焦點,直接去點擊注冊,這樣會導致id獲取不到,在後台進行數據轉換時就會出錯了
在父窗口中訂閱 Form.MdiChildActivate Event。
Occurs when a multiple-document interface (MDI) child form is activated or closed within an MDI application.
You can use this event to perform tasks such as updating the contents of the MDI child form and changing the menu options available in the MDI parent form based on the status of the MDI child form that is activated.
以上來自msdn:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.mdichildactivate.aspx