a7DocumentDbStudio.ViewModel.CollectionVM.updateSelectedViewInConfig C# (CSharp) Method

updateSelectedViewInConfig() private method

private updateSelectedViewInConfig ( ) : void
return void
        private void updateSelectedViewInConfig()
        {
            if (this.Workspace.ExpItem.View == null)
                this.Workspace.ExpItem.View = new CollectionViewModel();
            this.Workspace.ExpItem.View.Filter = this.Filter;
            this.Workspace.ExpItem.View.SqlText = this.SqlText;
            this.Workspace.ExpItem.View.Columns = this.Columns.ToList();
            this.Workspace.ExpItem.View.CollectionName = this._model.Name;
            this.Workspace.ExpItem.View.IsSqlEditMdoe = this.IsSqlEditMode;
            if(this.IsSqlEditMode)
                this.Workspace.ExpItem.View.IsSqlVisible = true;
            // Commented out because we don't need to save the current view settings anymore. (it was used when current view settings where saved to restore on next run)
            //Config.Instance.UpdateSelectedCollectionView(vm =>
            //{
            //    vm.Filter = this.Filter;
            //    vm.SqlText = this.SqlText;
            //    vm.Columns = this.Columns.ToList();
            //    vm.CollectionName = this._model.Name;
            //    vm.IsSqlEditMdoe = this.IsSqlEditMode;
            //    if(this.IsSqlEditMode)
            //        vm.IsSqlVisible = true;
            //});
        }