Esempio n. 1
0
        public GatewayResult AddDataControlView(RuntimeReadOnlyView view, DcValuesBuilderBase dcValuesBuilder)
        {
            GatewayResult result = null;

            DataControlViews.Add(view);
            int boundControlId = ((DataControlSourceViewDefinition)view.DataSourceViewDefinition).BoundControlId;
            var dsId           = view.DataSourceViewDefinition.TaskDataSource.DataSourceDefinition.Id;
            var strategy       = new DataControlValuesComputeStrategy(boundControlId, dcValuesBuilder, view.RangeBuilder, dsId);
            var unitId         = RecomputeIdFactory.GetRecomputeId(typeof(DcValues), boundControlId);

            RecordComputer.Add(unitId, strategy);
            result = view.OpenDataSource();
            view.BuildCursor();

            if (result.Success)
            {
                view.Prepare();
            }

            return(result);
        }