private void SaveQueryCondition() { string _errorMsg = ""; if (!this.sinoSZUC_MD_Model_FieldList1.CheckItems(ref _errorMsg)) { XtraMessageBox.Show(string.Format("选择查询结果不正确:{0}", _errorMsg), "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!this.sinoSZUC_ConditionPanel1.CheckInput(ref _errorMsg)) { XtraMessageBox.Show(string.Format("查询条件不正确:{0}", _errorMsg), "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } Dialog_SaveQuery _f = new Dialog_SaveQuery(); if (_f.ShowDialog() == DialogResult.OK) { MC_QueryRequsetFactory _rf = new MC_QueryRequsetFactory(); _rf.QueryModelName = this.QueryModelName; this.sinoSZUC_ConditionPanel1.InsertConditions2QueryRequest(_rf); this.sinoSZUC_MD_Model_FieldList1.InsertResultFields2QueryRequest(_rf); using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { _msc.SaveQuery(_f.SaveName, _f.IsPublic, _rf.GetQueryRequest()); } } }