private void OnFormLoad(object sender, System.EventArgs e) { //Initialize controls - set default values this.Cursor = Cursors.WaitCursor; try { //Set initial service states this.Visible = true; Application.DoEvents(); //Get selection lists this.mOutboundAgentServiceDS.Merge(EnterpriseFactory.GetOutboundAgentServices(this.mAgentID)); //Set control services this.txtDescription.MaxLength = 40; this.txtDescription.Text = this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].Description; this.txtMnemonic.MaxLength = 3; this.txtMnemonic.Text = this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].Mnemonic; if (!this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].IsAgentServiceIDNull()) { this.cboNativeServiceType.SelectedValue = this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].AgentServiceID; } else if (this.cboNativeServiceType.Items.Count > 0) { this.cboNativeServiceType.SelectedIndex = 0; } this.cboNativeServiceType.Enabled = (this.cboNativeServiceType.Items.Count > 0); this.chkIsPickup.Checked = this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].IsPickup; this.chkStatus.Checked = this.mOutboundServiceTypeDS.OutboundServiceTypeTable[0].IsActive; } catch (Exception ex) { reportError(ex); } finally { this.btnOk.Enabled = false; this.Cursor = Cursors.Default; } }