Пример #1
0
        private void SaveData()
        {
            using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
            {
                this.gridView1.PostEditor();
                string             _displayString = this.TE_DISPLAY.EditValue.ToString();
                MDType_DisplayType _displayType   = (this.TE_DISPLAYTYPE.SelectedIndex == 0) ? MDType_DisplayType.GridType : MDType_DisplayType.FormType;
                bool _ret = _mdc.SaveViewTable_UserDefine(this.ViewTableDefine.ViewTableID, _displayString, _displayType, TableColumnDefine.ToArray());
                if (_ret)
                {
                    this.ViewTableDefine.DisplayTitle = _displayString;
                    this.ViewTableDefine.DisplayType  = _displayType;
                    this.ViewTableDefine.Columns      = TableColumnDefine;
                    Object _tcDefine = CloneSerializeObject.Clone(ViewTableDefine.Columns);
                    TableColumnDefine = _tcDefine as List <MD_ViewTableColumn>;

                    this._haveChange = false;
                    XtraMessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    RaiseDataSaved();
                }
                else
                {
                    XtraMessageBox.Show("保存失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }
Пример #2
0
        private void RefreshData()
        {
            Object _tcDefine = CloneSerializeObject.Clone(ViewTableDefine.Columns);

            TableColumnDefine = _tcDefine as List <MD_ViewTableColumn>;
            ShowData();
        }
Пример #3
0
        public void InitData(MD_ViewTable _viewTable)
        {
            ViewTableDefine = _viewTable;
            Object _tcDefine = CloneSerializeObject.Clone(ViewTableDefine.Columns);

            TableColumnDefine = _tcDefine as List <MD_ViewTableColumn>;
            ShowData();

            _initFinished = true;
            RaiseDataChanged();
        }