public void RefreshSetting() { _isBinding = true; try { _ae = new ApplyEnum(); //点击刷新按钮重新刷新时,先清除下拉框内容,再加载 cbxInterfaceName.Items.Clear(); foreach (string key in _ae.Keys) { cbxInterfaceName.Items.Add(key); txtAssemblyFile.Text = _ae[key]; } if (cbxInterfaceName.Items.Count > 0) { cbxInterfaceName.SelectedIndex = 0; txtAssemblyFile.Text = _ae[cbxInterfaceName.Text]; } BindHisServer(); } finally { _isBinding = false; } SyncSelRowData(); }
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); } }