private void SaveData() { this._menuDefine.DisplayOrder = (int)this.TE_DISPLAYORDER.EditValue; this._menuDefine.MenuIcon = (this.TE_ICON.SelectedItem == null) ? "-1" : this.TE_ICON.SelectedItem.ToString(); this._menuDefine.MenuName = this.TE_MENUNAME.EditValue.ToString(); this._menuDefine.MenuParameter = this.TE_CS.EditValue.ToString(); this._menuDefine.MenuToolTip = this.TE_TOOLTIP.EditValue.ToString(); if (this.TE_MenuType.SelectedItem == null) { if (this.TE_MenuType.EditValue == null) { this._menuDefine.MenuType = ""; } else { this._menuDefine.MenuType = this.TE_MenuType.EditValue.ToString(); } } else { MenuType _mt = this.TE_MenuType.SelectedItem as MenuType; if (_mt == null) { this._menuDefine.MenuType = ""; } else { this._menuDefine.MenuType = _mt.TypeCommandName; } } this._menuDefine.ShowInToolBar = (this.TE_TOOLBAR.SelectedIndex == 0); using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { _mdc.SaveMenuDefine(this._menuDefine); this._haveChange = false; RaiseDataChanged(); } }