Exemplo n.º 1
0
        private void BindHISSource()
        {
            try
            {
                HisServerModel hisServerM = new HisServerModel(_dbQuery);

                DataTable dt = hisServerM.GetAllHisServer();

                cbxHISDB.DisplayMember = "服务名称";
                cbxHISDB.DataSource    = dt;

                if (cbxHISDB.Items.Count > 0)
                {
                    if (_applySearchDesign.HIS库名称 != "")
                    {
                        cbxHISDB.Text = _applySearchDesign.HIS库名称;
                    }
                    else
                    {
                        cbxHISDB.SelectedIndex = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private void BindHisServer()
        {
            DataTable dtResult = _hsm.GetAllHisServer();

            dataGridView1.DataSource = dtResult;

            if (dataGridView1.Columns.Count > 0)
            {
                dataGridView1.Columns["HIS服务ID"].Visible   = false;
                dataGridView1.Columns["服务配置"].Visible      = false;
                dataGridView1.Columns["服务名称"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            }
        }