/// <summary> /// 绑定科室 /// </summary> private void BindDepartment() { //DataTable dtDepartment = _scm.GetDepartment(); DataTable dtDepartment = _departmentMatchModel.GetAllDepartment(); cbxDepartment.DisplayMember = "科室名称"; cbxDepartment.ValueMember = "科室ID"; cbxDepartment.DataSource = dtDepartment; if (cbxDepartment.Items.Count > 0) { cbxDepartment.SelectedIndex = 0; } }
public void RefreshSetting() { DataTable dtDepartment = _departmentMatchModel.GetAllDepartment(); cbxDepartment.DataSource = null; cbxDepartment.DisplayMember = "科室名称"; cbxDepartment.ValueMember = "科室ID"; cbxDepartment.DataSource = dtDepartment; if (cbxDepartment.Items.Count > 0) { cbxDepartment.SelectedIndex = 0; } }
private void BindDepartmentMatch() { DataTable dtResult = _dmm.GetAllDepartment(); dataGridView1.DataSource = dtResult; if (dataGridView1.Columns.Count > 0) { //a.科室ID,a.科室名称,a.附加数据, b.科室对照ID,b.对照来源,b.对照编码 dataGridView1.Columns["科室ID"].Visible = false; dataGridView1.Columns["附加数据"].Visible = false; dataGridView1.Columns["科室名称"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; //dataGridView1.Columns["附加数据"].Visible = false; //dataGridView1.Columns["对照编码"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } }
public void RefreshSetting() { try { //DataTable dt = _DepRoomModel.GetDepts(); DataTable dt = _departmentMatchModel.GetAllDepartment(); cboDept.DisplayMember = "科室名称"; cboDept.ValueMember = "科室ID"; cboDept.DataSource = dt; if (cboDept.Items.Count > 0) { cboDept.SelectedIndex = 0; } //刷新影像类别 InitCbo(); } catch (Exception ex) { MsgBox.ShowException(ex, this); } }