private void StatusUpdate_Load(object sender, EventArgs e) { label_name.Text = sta.Name; label_id.Text = sta.ID.ToString(); //load BUS_STATUSS buss = new BUS_STATUSS(); DataTable dt = new DataTable(); dt.Load(buss.GetStatus()); comboBox1.DataSource = dt; comboBox1.DisplayMember = "NameStatus"; comboBox1.ValueMember = "ID"; }
private void Invest_Load(object sender, EventArgs e) { BUS_MONITOR buss = new BUS_MONITOR(); BUS_STATUSS busstt = new BUS_STATUSS(); DataTable dtMon = new DataTable(); DataTable dtStatus = new DataTable(); dtMon.Load(buss.GetMonitor()); dtStatus.Load(busstt.GetStatus()); // comboBox_monitor.DataSource = dtMon; comboBox_status.DataSource = dtStatus; comboBox_monitor.ValueMember = "ID"; comboBox_monitor.DisplayMember = "NameMonitor"; comboBox_status.ValueMember = "ID"; comboBox_status.DisplayMember = "NameStatus"; }