private void refreshChannelList() { Data channels = ShardDb.getCustomerChannels(); if (!channels.Success) { this.Close(); return; } comboBoxChannel.DisplayMember = "name"; comboBoxChannel.ValueMember = "id"; comboBoxChannel.DataSource = channels.DataTable; }
private void Statistic_Load(object sender, EventArgs e) { dateTimePickerStartDate.Value = DateTime.Today; dateTimePickerEndDate.Value = DateTime.Today; Data channels = ShardDb.getCustomerChannels(); if (!channels.Success) { this.Close(); return; } DataTable dataTableCustomerChannels = channels.DataTable; comboBoxChannel.DisplayMember = "name"; comboBoxChannel.ValueMember = "id"; DataRow row = dataTableCustomerChannels.NewRow(); row[0] = 0; row[1] = "全部"; dataTableCustomerChannels.Rows.InsertAt(row, 0); comboBoxChannel.DataSource = dataTableCustomerChannels; }