/// <summary> /// 保存新的指标组定义 /// </summary> internal bool SaveNew() { this._guideLineGroup.ZBZTSM = (this.TE_Descript.EditValue == null) ? "" : this.TE_Descript.EditValue.ToString(); this._guideLineGroup.QXLX = this.TE_RightType.SelectedIndex; this._guideLineGroup.ZBZTMC = this.TE_GroupName.EditValue.ToString(); this._guideLineGroup.NamespaceName = (this.TE_Namespace.EditValue == null) ? "" : this.TE_Namespace.EditValue.ToString(); using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { if (_mdc.IsExistGuideLineGroupName(this._guideLineGroup.ZBZTMC)) { XtraMessageBox.Show(string.Format("已经存在名称为{0}的指标组!", _guideLineGroup.ZBZTMC), "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } if (_mdc.SaveNewGuideLineGroupDefine(this._guideLineGroup)) { this._haveChange = false; return(true); } else { XtraMessageBox.Show("保存失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } } }