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(); }
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; }
public void EditValue(Property property, object designer) { ExecuteSQLDesigner executeSqlDesigner = (ExecuteSQLDesigner)designer; ResultTypeEditorWindow.Display(new ResultTypeViewModel(executeSqlDesigner)); }