Exemple #1
0
        public ResultTypeViewModel(ExecuteSQLDesigner executeSQLDesigner)
        {
            this.executeSQLDesigner = executeSQLDesigner;
            CreateDataFromSql       = new DelegateCommand(CreateFromSQL, CanCreateFromSQL);
            Save = new DelegateCommand(ExecuteSave);

            selectedCustomType = executeSQLDesigner.ResultTypeValue.CustomType;

            foreach (var resultType in executeSQLDesigner.ResultTypeValue.Fields)
            {
                var model = new ResultFieldModel(this, resultType);
                model.ColumnNameChanged += ModelColumnNameChanged;
                model.NameChanged       += ModelNameChanged;
                ResultFields.Add(model);
            }
            AddDefaultChild();
        }
Exemple #2
0
        public SQLViewModel(ExecuteSQLDesigner executeSQLDesigner)
        {
            this.connectionType   = executeSQLDesigner.ResolvedConnectionType;
            this.connectionString = executeSQLDesigner.ResolvedConnectionString;

            this.sqlStringHandler           = new SqlStringHandler();
            this.sqlStringHandler.SqlString = executeSQLDesigner.ResolvedSqlStatementValue ?? string.Empty;

            this.sqlIndex        = 0;
            this.designerContext = executeSQLDesigner.Context;
            Designer             = executeSQLDesigner;

            this.queryResults = null;
            this.queryError   = String.Empty;

            DatabaseObjects = new ObservableCollection <NodeViewModel>();

            this.refreshIsRunning    = false;
            this.executeSQLIsRunning = false;
        }
Exemple #3
0
        public void EditValue(Property property, object designer)
        {
            ExecuteSQLDesigner executeSqlDesigner = (ExecuteSQLDesigner)designer;

            ResultTypeEditorWindow.Display(new ResultTypeViewModel(executeSqlDesigner));
        }