private void ModifyTradeLimitForm_Load(object sender, EventArgs e) { this.comboBox交易员.DataSource = Program.AASServiceClient.QueryJY(); this.comboBox交易员.DisplayMember = "用户名"; AASClient.AASServiceReference.DbDataSet.券商帐户DataTable 券商帐户DataTable1 = Program.AASServiceClient.QueryQsAccount(); foreach (AASClient.AASServiceReference.DbDataSet.券商帐户Row 券商帐户Row1 in 券商帐户DataTable1) { this.comboBox组合号.Items.Add(券商帐户Row1.称); } if (this.comboBox组合号.Items.Count > 0) { this.comboBox组合号.SelectedIndex = 0; } this.comboBox买模式.DataSource = System.Enum.GetNames(typeof(买模式)); this.comboBox卖模式.DataSource = System.Enum.GetNames(typeof(卖模式)); this.comboBox交易员.Text = this.额度分配.交易员; this.comboBox组合号.Text = this.额度分配.组合号; this.textBox证券代码.Text = this.额度分配.证券代码; this.comboBox市场.SelectedIndex = this.额度分配.市场; this.textBox证券名称.Text = this.额度分配.证券名称; this.textBox拼音缩写.Text = this.额度分配.拼音缩写; this.comboBox买模式.SelectedIndex = this.额度分配.买模式; this.comboBox卖模式.SelectedIndex = this.额度分配.卖模式; this.numericUpDown交易额度.Value = this.额度分配.交易额度; this.numericUpDown手续费率.Value = this.额度分配.手续费率; }
private void AddTradeLimitForm_Load(object sender, EventArgs e) { this.comboBox交易员.DataSource = Program.AASServiceClient.QueryJY(); this.comboBox交易员.DisplayMember = "用户名"; AASClient.AASServiceReference.DbDataSet.券商帐户DataTable 券商帐户DataTable1 = Program.AASServiceClient.QueryQsAccount(); AASClient.AASServiceReference.DbDataSet.恒生帐户DataTable 恒生帐户DataTable1 = Program.AASServiceClient.QueryHsAccount(); foreach (AASClient.AASServiceReference.DbDataSet.券商帐户Row 券商帐户Row1 in 券商帐户DataTable1) { this.comboBox组合号.Items.Add(券商帐户Row1.称); } foreach (AASClient.AASServiceReference.DbDataSet.恒生帐户Row 恒生帐户Row1 in 恒生帐户DataTable1) { this.comboBox组合号.Items.Add(恒生帐户Row1.称); } if (this.comboBox组合号.Items.Count > 0) { this.comboBox组合号.SelectedIndex = 0; } //如果Ayers接口可用,则加入Ayers对应组合号 try { var accInfo = Program.AASServiceClient.GetAyersAccount(); if (accInfo.StartsWith("1|")) { this.comboBox组合号.Items.Add("Ayers"); } } catch { } this.comboBox市场.SelectedIndex = 0; this.comboBox买模式.DataSource = System.Enum.GetNames(typeof(买模式)); this.comboBox卖模式.DataSource = System.Enum.GetNames(typeof(卖模式)); }