private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { List <MDQuery_GuideLineParameter> _params = this.sinoSZUC_GuideLineDynamicInput21.GetParamters(); GuideLineQueryData.Clear(); foreach (MD_GuideLine _gl in GuideLineDict.Values) { if (_gl.GuideLineMethod == "") { GuideLineQueryData.Add(_gl.ID, -1); } else { using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { int _resCount = _msc.QueryGuideLineResultCount(_gl.ID, _params.ToArray()); GuideLineQueryData.Add(_gl.ID, _resCount); } } } }