private void OnControlLoad(object sender, EventArgs e) { //Event handler for load event this.Cursor = Cursors.WaitCursor; try { if (this.mReadOnly) { this.mCompanyDS.Merge(CustomerProxy.GetCompanies()); } else { this.mCompanyDS.Merge(CustomerProxy.GetCompanies(true)); } this.cboCompany.Enabled = !this.mReadOnly && this.cboCompany.Items.Count > 0; this.cboScope.Enabled = this.cboLocation.Enabled = this.txtStore.Enabled = this.btnStoreDetail.Enabled = this.txtStoreDetail.Enabled = false; this.cboCompany.SelectedIndex = -1; this.cboLocation.DataSource = null; } catch (Exception ex) { reportError(new ControlException("Unexpected error while loading CompanyLocation control.", ex)); } finally { this.Cursor = Cursors.Default; } }