private void InitApplyHISDB()
        {
            DataTable dt;

            try
            {
                //查找对应的HIS数据库配置
                if (_hisServerModel == null)
                {
                    _hisServerModel = new HisServerModel(_dbQuery);
                }

                dt = _hisServerModel.GetAllHisServer();

                //现在版本,先支持一个HIS库,下次迭代修改,再增加同时连接多个HIS库的方式
                HisServerCfgData cfgData = new HisServerCfgData();
                cfgData.BindRowData(dt.Rows[0]);

                ApplyEnum _ae = new ApplyEnum();
                _applyHISDB = _ae.CreateInstance(cfgData.务配置.HIS接口名称) as IApply;
                _applyHISDB.ConfigString = cfgData.务配置.接口配置.ToString();
                _applyHISDB.UserName     = _userData.Name;
                _applyHISDB.Init(_dbQuery);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private void butVerfiyCfg_Click(object sender, EventArgs e)
        {
            try
            {
                //必须要选选择接口名称,才能对接口进行配置
                if (string.IsNullOrEmpty(cbxInterfaceName.Text))
                {
                    MessageBox.Show("请先选择HIS接口名称,再进行接口配置。", "提示");
                    cbxInterfaceName.Focus();
                    return;
                }
                IApply applyInstance = _ae.CreateInstance(cbxInterfaceName.Text) as IApply;

                if (applyInstance == null)
                {
                    MessageBox.Show("实例化失败,不能进行配置。", "提示");
                    return;
                }
                if (cbxInterfaceName.Tag != null)
                {
                    applyInstance.ConfigString = cbxInterfaceName.Tag.ToString();
                }

                if (applyInstance.ShowCfg(this))
                {
                    cbxInterfaceName.Tag = applyInstance.ConfigString;

                    if (textAlias.Tag != null)
                    {
                        HisServerCfgData cfgData = GetSelectServerCfgData();

                        cfgData.务配置.接口配置 = cbxInterfaceName.Tag.ToString();

                        _hsm.UpdateHisServerCfg(cfgData);

                        DataRow dr = cfgData.GetBindRow();

                        dr["服务配置"] = cfgData.务配置.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }