Пример #1
0
 public MD_QueryModel SaveNew()
 {
     using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
     {
         _queryModel                 = new MD_QueryModel();
         _queryModel.Description     = (this.TE_DES.EditValue == null) ? "" : this.TE_DES.EditValue.ToString();
         _queryModel.DisplayTitle    = (this.TE_DISPLAY.EditValue == null) ? this.TE_MODELNAME.EditValue.ToString() : this.TE_DISPLAY.EditValue.ToString();
         _queryModel.DisplayOrder    = Convert.ToInt32((this.TE_DISPLAYORDER.EditValue == null) ? "0" : this.TE_DISPLAYORDER.EditValue.ToString());
         _queryModel.QueryModelName  = this.TE_MODELNAME.EditValue.ToString();
         _queryModel.IsFixQuery      = (this.TE_TYPE.Items[0].CheckState == CheckState.Checked);
         _queryModel.IsRelationQuery = (this.TE_TYPE.Items[1].CheckState == CheckState.Checked);
         _queryModel.IsDataAuditing  = (this.TE_TYPE.Items[2].CheckState == CheckState.Checked);
         _queryModel.QueryInterface  = (this.te_Ics.EditValue.ToString());
         _queryModel.NamespaceName   = (_nameSpace == null) ? "" : _nameSpace.NameSpace;
         _queryModel.DWDM            = _nameSpace.DWDM;
         _queryModel.EXTMeta         = (this.te_ExtMeta.EditValue == null) ? "" : this.te_ExtMeta.EditValue.ToString();
         _mdc.SaveNewQueryModel(_queryModel);
     }
     _haveChange = false;
     RaiseDataChanged();
     return(_queryModel);
 }