Beispiel #1
0
        void analysisEditor_DataSourceCreating(object sender, DataSourceCreatingEventArgs e)
        {
            CriteriaOperator userCriteria = null;

            if (e.AnalysisInfo != null)
            {
                if (!string.IsNullOrEmpty(e.AnalysisInfo.Criteria))
                {
                    using (ObjectSpace.CreateParseCriteriaScope()) {
                        userCriteria = CriteriaWrapper.ParseCriteriaWithReadOnlyParameters(e.AnalysisInfo.Criteria, e.AnalysisInfo.DataType);
                    }
                }

                var analysisEditorBase   = (AnalysisEditorBase)sender;
                var criteriaOperatorArgs = new CriteriaOperatorArgs(analysisEditorBase, e.AnalysisInfo);
                var analysisEditorArgs   = new AnalysisEditorArgs(analysisEditorBase, e.AnalysisInfo);
                InvokeDatasourceCreating(analysisEditorArgs);
                InvokeApplyingCollectionCriteria(criteriaOperatorArgs);
                e.DataSource = analysisEditorArgs.Handled
                                   ? analysisEditorArgs.DataSource
                                   : ObjectSpace.CreateCollection(e.AnalysisInfo.DataType,
                                                                  userCriteria & criteriaOperatorArgs.Criteria & _criteriaOperator);
                e.Handled = true;
                InvokeDataSourceCreated(analysisEditorArgs);
            }
        }
        protected virtual void InvokeDataSourceCreated(AnalysisEditorArgs e)
        {
            EventHandler <AnalysisEditorArgs> handler = DataSourceCreated;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        public void InvokeDatasourceCreating(AnalysisEditorArgs e)
        {
            EventHandler <AnalysisEditorArgs> handler = DatasourceCreating;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        void analysisEditor_DataSourceCreating(object sender, DataSourceCreatingEventArgs e) {
            CriteriaOperator userCriteria = null;
            
            if (e.AnalysisInfo != null) {
                if (!string.IsNullOrEmpty(e.AnalysisInfo.Criteria)) {
                    userCriteria = CriteriaWrapper.ParseCriteriaWithReadOnlyParameters(e.AnalysisInfo.Criteria,e.AnalysisInfo.DataType);
                }

                var analysisEditorBase = (AnalysisEditorBase)sender;
                var criteriaOperatorArgs = new CriteriaOperatorArgs(analysisEditorBase,e.AnalysisInfo);
                var analysisEditorArgs = new AnalysisEditorArgs(analysisEditorBase, e.AnalysisInfo);
                InvokeDatasourceCreating(analysisEditorArgs);
                InvokeApplyingCollectionCriteria(criteriaOperatorArgs);
                e.DataSource = analysisEditorArgs.Handled
                                   ? analysisEditorArgs.DataSource
                                   : View.ObjectSpace.CreateCollection(e.AnalysisInfo.DataType,
                                                                       userCriteria & criteriaOperatorArgs.Criteria &_criteriaOperator);
                e.Handled = true;
                InvokeDataSourceCreated(analysisEditorArgs);
            }            
        }
Beispiel #5
0
        protected virtual void InvokeDataSourceCreated(AnalysisEditorArgs e)
        {
            EventHandler <AnalysisEditorArgs> handler = DataSourceCreated;

            handler?.Invoke(this, e);
        }
 protected virtual void InvokeDataSourceCreated(AnalysisEditorArgs e){
     EventHandler<AnalysisEditorArgs> handler = DataSourceCreated;
     if (handler != null) handler(this, e);
 }
 public void InvokeDatasourceCreating(AnalysisEditorArgs e){
     EventHandler<AnalysisEditorArgs> handler = DatasourceCreating;
     if (handler != null) handler(this, e);
 }