示例#1
0
        public OnOffFilterConfiguration(FilterItem filterItem)
        {
            HasName(filterItem.Name);
            Layout.HasController <OnOffFilterLayoutController>();

            HasConfig(filterItem);
            HasController <OnOffFilterController>();

            Layout.HasConfig(filterItem);


            DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(filterItem.ViewId)
            .Transform().By <CubeDataToDictionaryTransformer>();

            ModifyParameter(filterItem.ModifyParam);

            if (filterItem.HasParamDependency != null)
            {
                foreach (var p in filterItem.HasParamDependency)
                {
                    HasParameterDependency.On(p);
                }
            }
        }
 public WelcomeTextnImageWidgetConfiguration(WidgetItem widgetItem)
 {
     HasName(widgetItem.Name);
     View.HasConfig("")
     .HasController <WelcomeTextnImageWidgetController>();
     HasParameterDependency.On(widgetItem.HasParamDependency);
 }
        public IntProductsAllLocationByProductsWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            View.HasConfig("").HasController <ExpandCollapseTableWidgetController>();
            View.DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <IntProductsAllLocationByProductsTransformer>()
            //.HasProperty(t => t._Measure).WithValue(p => p["@@Measure_text"])
            .HasProperty(t => t._Measure).WithValue(p => p["@@UnitOrValue_text"])
            .HasProperty(t => t._IsThousand).WithValue(p => p[ParameterList.AbsoluteThousandFilter] == "Thousand")
            .HasProperty(t => t.CompanyOrBrandHeader).WithValue(GetHeader);
            HasParameterDependency.On(widgetItem.HasParamDependency);

            Export.HasController <ExpandCollapseTableExportController>().HasConfig("Categories-SixColumns")
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <IndicatorImageExcelTransformer>()
            .Transform().By <CubeDataToXTableExpandCollapseTableTransformer>()
            .HasProperty(t => t.NameColumnValue).WithValue(GetHeader)
            .HasProperty(t => t.MeasureText).WithValue(p => p[ParameterList.TypeOfMeasure])
            .Transform().By <ExportModelTransformer>()
            .HasProperty(t => t.NavigationNameString).WithValue(p => p.CurrentNavigationLabel())
            .HasProperty(t => t.RegionOrCluster).WithValue(p => p["@@" + ParameterList.RegionOrCluster + "_text"])
            .HasProperty(t => t.Country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.Segment).WithValue(p => p["@@" + ParameterList.Segment + "_text"])
            //.HasProperty(t => t.Forms).WithValue(p => p["@@" + ParameterList.Form + "_text"])
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .Transform().By <ExportTableSplitTrasformerForPpt>();
        }
        public Top10IntPrdTableConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            View.HasConfig(GetBarChartFooter)
            .HasController <SimpleTableWidgetController>();
            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <SingleTableTransformer>()
            .HasProperty(t => t.CategoryText).WithValue("")
            .HasProperty(t => t.GeoText).WithValue("")
            .HasProperty(t => t.PeriodTypeText).WithValue("")
            .HasProperty(t => t.WidgetName).WithValue(widgetItem.Name)
            .HasProperty(t => t.Periodtext).WithValue("");

            Export.HasController <HomeExportController>().HasConfig("Top10IntPrdTable")
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <CubeDataToXTableHomeTopRankingTransformer>()
            .Transform().By <ExportModelTransformer>()
            .HasProperty(t => t.NavigationNameString).WithValue(p => p["Navigation_Label"])
            .HasProperty(t => t.Country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.Product).WithValue(p => p["@@" + ParameterList.Product + "_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"]);

            //.HasProperty(t => t.MeasureText).WithValue(p => p["@@Measure_text"])
            //.HasProperty(t => t.CategoryText).WithValue(p => p["@@MarketCategory_text"])
            //.HasProperty(t => t.SubCategoryText).WithValue(p => p["@@MarketSubCategory_text"])
            //.HasProperty(t => t.SegementText).WithValue(p => p["@@Segment_text"])
            //.HasProperty(t => t.ChannelText).WithValue(p => p["@@Channel_text"])
            //.HasProperty(t => t.SubChannelText).WithValue(p => p["@@SubChannel_text"]);
            HasParameterDependency.On(widgetItem.HasParamDependency);
        }
        public ExpandCollapseTableWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            View.HasConfig("").HasController <ExpandCollapseTableWidgetController>();
            View.DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <ExpandCollapseTableTransformer>()
            .HasProperty(t => t.NavigationName).WithValue(p => p[ParameterList.NavigationName])
            //.HasProperty(t => t.MeasureText).WithValue(p => p["@@Measure_text"])
            .HasProperty(t => t.NameColumnValue).WithValue(GetNameColumnText(widgetItem));
            //.HasProperty(t => t._IsThousand).WithValue(p => p[ParameterList.AbsoluteThousandFilter] == "Thousand")
            // .HasProperty(t => t._IsMoleculeAtAGlance).WithValue(p => p.CurrentNavigationName() == NavigationItems.NavMoleculeAllLocationsAtGlance().Name)
            //.HasProperty(t => t._IsBrandAtAGlance).WithValue(p => p.CurrentNavigationName() == NavigationItems.NavBrandsAllLocationsAtGlance().Name)
            //.HasProperty(t => t._IsSubbrandAtAGlance).WithValue(p => p.CurrentNavigationName() == NavigationItems.NavSubBrandsAllLocationsAtGlance().Name)
            // .HasProperty(t => t.ShowFullLength).WithValue(widgetItem.Name == WidgetItems.SubBrandExpCollapseTableWidget().Name || widgetItem.Name == WidgetItems.SKUExpCollapseTableWidget().Name || widgetItem.Name == WidgetItems.MoleculesExpCollapseTableWidget().Name);


            Export.HasController <ExpandCollapseTableExportController>().HasConfig(widgetItem.Name + " - At a Glance")
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <IndicatorImageExcelTransformer>()
            .Transform().By <CubeDataToXTableExpandCollapseTableTransformer>()
            .HasProperty(t => t.NameColumnValue).WithValue(GetNameColumnText(widgetItem))
            //.HasProperty(t => t.MeasureText).WithValue(p => p["@@Measure_text"])
            .Transform().By <ExportModelTransformer>()

            .HasProperty(t => t.NavigationNameString).WithValue(p => p.CurrentNavigationLabel())
            .HasProperty(t => t.RegionOrCluster).WithValue(p => p["@@" + ParameterList.RegionOrCluster + "_text"])
            .HasProperty(t => t.Country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.Segment).WithValue(p => p["@@" + ParameterList.Segment + "_text"])
            //.HasProperty(t => t.Forms).WithValue(p => p["@@" + ParameterList.Form + "_text"])
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .Transform().By <ExportTableSplitTrasformerForPpt>();


            //.HasProperty(t => t.NavigationNameString).WithValue(p => p["Navigation_Label"])
            //.HasProperty(t => t.GeoMaptext).WithValue(p => p["RB_Geo_text"])
            // .HasProperty(t => t.TimePeriodText).WithValue(p => p["@@Period_text"])
            // .HasProperty(t => t.MeasureText).WithValue(p => p["@@Measure_text"])
            // .HasProperty(t => t.CategoryText).WithValue(p => p["@@MarketCategory_text"])
            // .HasProperty(t => t.SubCategoryText).WithValue(p => p["@@MarketSubCategory_text"])
            // .HasProperty(t => t.SegementText).WithValue(p => p["@@Segment_text"])
            // .HasProperty(t => t.ChannelText).WithValue(p => p["@@Channel_text"])
            // .HasProperty(t => t.SubChannelText).WithValue(p => p["@@SubChannel_text"]);
            //.Transform().By<ExportTableSplitTrasformerForPpt>();

            HasParameterDependency.On(widgetItem.HasParamDependency);
        }
示例#6
0
        public SnapshotChartWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            HasTitle(widgetItem.Name);

            View.HasController <CombiHomeChartWidgetController>();

            View.HasConfig("");

            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <CompanySnapshotChartDataTransformer>()
            .HasProperty(t => t.PeriodString).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.MeasureValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"]);
            HasParameterDependency.On(widgetItem.HasParamDependency);
        }
        public CompanyTrendTableChartWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            this.widgetItem = widgetItem;
            View.HasConfig(p => p)
            .HasController <CompanyTrendTableWidgetController>();

            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <CompanyTrendTableChartTransformer>()
            .HasProperty(t => t.MeasureType).WithValue(p => p[ParameterList.TypeOfMeasure])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.Date).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .HasProperty(t => t.NavigationName).WithValue(p => p[ParameterList.NavigationName])
            .HasProperty(t => t.ParamName)
            .WithValue(p => GetParamName())
            .HasProperty(t => t.ShowFullLength).WithValue(true)
            .HasProperty(t => t.NameColumHeaderText).WithValue(GetHeaderText)
            .HasProperty(t => t.UncheckedItems).WithValue(GetUncheckedItems)     //UNChecked items could be a bug
            .HasProperty(t => t.AbsoluteTousandValue).WithValue(p => p[ParameterList.AbsoluteThousandFilter]);



            Export.HasController <TrendTableChartExportController>().HasConfig("CompanyTrend")
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <CubeDataToXTableTrendTransformer>()
            //.HasProperty(t => t.PeriodType).WithValue(p => p["@@TimePeriod_text"])
            //.HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"])
            //.HasProperty(t => t.EndDate).WithValue(p => p["@@EndDate_text"])
            //.HasProperty(t => t.AbsoluteThousandValue).WithValueWithValue("Thousand")
            .Transform().By <ExportModelTransformer>()
            .HasProperty(t => t.MeasureType).WithValue(p => p[ParameterList.TypeOfMeasure])
            .HasProperty(t => t.NavigationNameString).WithValue(p => p["Navigation_Label"])
            .HasProperty(t => t.RegionOrCluster).WithValue(p => p[ParameterList.RegionOrCluster])
            .HasProperty(t => t.Country).WithValue(p => p[ParameterList.Country])
            .HasProperty(t => t.Segment).WithValue(p => p["@@Segment_text"])
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"]);



            if (widgetItem.HasParamDependency != null && widgetItem.HasParamDependency.Count > 0)
            {
                HasParameterDependency.On(widgetItem.HasParamDependency);
            }
        }
        public CombinationChartWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            View.HasConfig("")
            .HasController <CombiChartWidgetController>();

            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <CombinationChartTransformer>()
            .HasProperty(t => t.WidgetName).WithValue(widgetItem.Name)
            .HasProperty(t => t.RegionOrCluster).WithValue(p => p["@@" + ParameterList.RegionOrCluster + "_text"])
            .HasProperty(t => t.country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.RevertAxis).WithValue(p => p["@@TimePeriod_text"] == "MAT" || p["@@TimePeriod_text"] == "YTD")
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            //.HasProperty(t => t.StartDate).WithValue(p => p["@@" + ParameterList.StartDate + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .HasProperty(t => t.UncheckedItems).WithValue(p => widgetItem.Name == WidgetItems.AllRegionCombinationChart().Name ? p[ParameterList.RegionUncheckedItems] : p[ParameterList.KsaUncheckedItems]);

            Export.HasConfig("HomeTrend" /*GetExportConfig*/).HasController <HomeExportController>()//p=>p["@@"+ParameterList.KPI+"_text"
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <CubeDataToXTableTrendTransformer>()
            //.HasProperty(t => t.KPI).WithValue(p => p["@@UnitOrValue_text"])
            //.HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            //.HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .Transform().By <ExportModelTransformer>()
            .HasProperty(t => t.NavigationNameString).WithValue(p => p.CurrentNavigationLabel())
            .HasProperty(t => t.RegionOrCluster).WithValue(p => p["@@" + ParameterList.RegionOrCluster + "_text"])
            .HasProperty(t => t.Country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.Segment).WithValue(p => p["@@" + ParameterList.Segment + "_text"])
            //.HasProperty(t => t.Forms).WithValue(p => p["@@" + ParameterList.Form + "_text"])
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"]);
            //.HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"])

            //.HasProperty(t => t.RevertAxis).WithValue(p => p["@@TimePeriod_text"] == "MAT" || p["@@TimePeriod_text"] == "YTD")

            //.HasProperty(t => t.StartDate).WithValue(p => p["@@" + ParameterList.StartDate + "_text"])

            //.HasProperty(t => t.UncheckedItems).WithValue(p => widgetItem.Name == WidgetItems.AllRegionCombinationChart().Name ? p[ParameterList.RegionUncheckedItems] : p[ParameterList.KsaUncheckedItems]);

            HasParameterDependency.On(widgetItem.HasParamDependency);
        }
示例#9
0
        public CommonFilterConfiguration(FilterItem filterItem)
        {
            HasName(filterItem.Name);
            HasLabel(filterItem.Label);

            Reload.If(true);
            Layout.HasConfig(p => IsVisible(p, filterItem))
            .HasController <DropdownFilterLayoutController>();

            DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(filterItem.ViewId)
            .Transform().By <CubeDataToDictionaryTransformer>()
            .HasProperty(t => t.isReverse).WithValue(p => IsReverse(p, filterItem));
            ModifyParameter(filterItem.ModifyParam);
            if (filterItem.HasParamDependency != null && filterItem.HasParamDependency.Count != 0)
            {
                HasParameterDependency.On(filterItem.HasParamDependency);
            }
        }
示例#10
0
        public TrendTableWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            View.HasConfig(p => p)
            .HasController <TrendTableWidgetController>();

            View.DataFlow.AddSource <CubeDataSourceBase>()//DummyTableDataSource
            .WithModule(widgetItem.ViewId)
            .Transform().By <TableChartTransformer>()
            .HasProperty(t => t.ShowFullLength).WithValue(true)
            .HasProperty(t => t.NavigationName).WithValue(p => p.CurrentNavigationName())
            .HasProperty(t => t.MeasureType).WithValue(p => p["@@KPI_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.Date).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .HasProperty(t => t.UncheckedItems).WithValue(p => widgetItem.Name == WidgetItems.AllRegionTrendTableWidget().Name ? p[ParameterList.RegionUncheckedItems] : p[ParameterList.KsaUncheckedItems])
            .HasProperty(t => t.ParamName).WithValue(p => widgetItem.Name == WidgetItems.AllRegionTrendTableWidget().Name ? ParameterList.RegionUncheckedItems : ParameterList.KsaUncheckedItems)
            .HasProperty(t => t.AbsoluteTousandValue).WithValue(p => p[ParameterList.AbsoluteThousandFilter])
            .HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"]);

            Export.HasConfig(GetExportConfig).HasController <TableExportController>()
            .DataFlow.AddSource <CubeDataSourceBase>().WithModule(widgetItem.ViewId)
            .Transform().By <CubeDataToXTableTrendTransformer>()
            //.HasProperty(t => t.KPI).WithValue(p => p["@@_text"])
            //.HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            //.HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            .Transform().By <ExportModelTransformer>()
            .HasProperty(t => t.NavigationNameString).WithValue(p => p.CurrentNavigationLabel())
            .HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"])
            .HasProperty(t => t.PeriodType).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            //.HasProperty(t => t.RevertAxis).WithValue(p => p["@@TimePeriod_text"] == "MAT" || p["@@TimePeriod_text"] == "YTD")
            .HasProperty(t => t.UnitValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.StartDate).WithValue(p => p["@@" + ParameterList.StartDate + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"])
            //.HasProperty(t => t.UncheckedItems).WithValue(p => widgetItem.Name == WidgetItems.AllRegionCombinationChart().Name ? p[ParameterList.RegionUncheckedItems] : p[ParameterList.KsaUncheckedItems])
            .Transform().By <ExportTableSplitTrasformerForPpt>();
            //.HasProperty(t => t.KPI).WithValue(p => p["@@KPI_text"]);

            if (widgetItem.HasParamDependency != null && widgetItem.HasParamDependency.Count > 0)
            {
                HasParameterDependency.On(widgetItem.HasParamDependency);
            }
        }
        public SnapshotBottomTableWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            HasTitle(widgetItem.Name);

            View.HasController <SnapshotTableWidgetController>();
            View.HasConfig(p => p);

            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <SnapshotTableTransformer>()
            .HasProperty(t => t.IsLowerTable).WithValue(true)
            .HasProperty(t => t.NameColumHeaderText).WithValue(GetHeaderText)
            .HasProperty(t => t.ShowFullLength).WithValue(true)
            .HasProperty(t => t.MeasureValue).WithValue(p => p["@@UnitOrValue_text"])
            .HasProperty(t => t.AbsoluteTousandValue).WithValue(p => p["absoluteThousandConversion"]);

            //.HasProperty(t => t.ShowFullLength).WithValue(widgetItem.Name == WidgetItems.BottomSubBrandSnapshotTable().Name || widgetItem.Name == WidgetItems.BottomSKUSnapshotTable().Name);

            //Export.HasController<SnapshotBottomTableExportController>()
            //      .DataFlow.AddSource<CubeDataSourceBase>()
            //      .WithModule(widgetItem.ViewId)
            //      .Transform().By<CubeDataToXTableSnapshotTransformer>()
            //      .HasProperty(t => t.IsTopTable).WithValue(false)
            //      .HasProperty(t => t.AbsoluteThousandValue).WithValue(p => p["absoluteThousandConversion"])
            //      .Transform().By<ExportSnapshotModelTransformer>()
            //      .HasProperty(t => t.NavigationNameString).WithValue(p => p["Navigation_Label"])
            //      .HasProperty(t => t.GeoMaptext).WithValue(p => p["RB_Geo_text"])
            //     .HasProperty(t => t.TimePeriodText).WithValue(p => p["@@Period_text"])
            //     .HasProperty(t => t.MeasureText).WithValue(p => p["@@Measure_text"])
            //     .HasProperty(t => t.CategoryText).WithValue(p => p["@@MarketCategory_text"])
            //     .HasProperty(t => t.SubCategoryText).WithValue(p => p["@@MarketSubCategory_text"])
            //     .HasProperty(t => t.SegementText).WithValue(p => p["@@Segment_text"])
            //     .HasProperty(t => t.ChannelText).WithValue(p => p["@@Channel_text"])
            //     .HasProperty(t => t.SubChannelText).WithValue(p => p["@@SubChannel_text"]);
            HasParameterDependency.On(widgetItem.HasParamDependency);
        }
示例#12
0
        public DatePickerFilterConfiguration(FilterItem filterItem)
        {
            HasName(filterItem.Name);
            HasLabel(filterItem.Label);

            Layout.HasConfig(filterItem);
            Layout.HasController <DatePickerFilterLayoutController>();

            HasConfig(filterItem);
            HasController <DatePickerFilterController>();

            DataFlow.AddSource <DateFilterDataSource>()
            .WithModule(filterItem.ViewId);

            ModifyParameter(filterItem.ModifyParam);

            if (filterItem.HasParamDependency != null)
            {
                foreach (var p in filterItem.HasParamDependency)
                {
                    HasParameterDependency.On(p);
                }
            }
        }
示例#13
0
        public FilterConfigurationBase(FilterItem filterItem)
        {
            HasName(filterItem.Name);
            HasLabel(filterItem.Label);
            Layout.HasConfig(p => GetFilterVisibilityConfiguration(p, filterItem));

            AddControllerAndValueSelector();

            Reload.If(true);

            //if (filterItem.Name == FilterItems.CountryFilter().Name)
            //{
            //    HasController<CustomFilterController>();
            //    HasValueSelector(new CustomFilterValueSelector());
            //}
            AddDataFlow(filterItem);


            ModifyParameter(filterItem.ModifyParam);
            if (filterItem.HasParamDependency != null && filterItem.HasParamDependency.Count != 0)
            {
                HasParameterDependency.On(filterItem.HasParamDependency);
            }
        }
示例#14
0
        public SnapShotTopTableWidgetConfiguration(WidgetItem widgetItem)
        {
            HasName(widgetItem.Name);
            HasTitle(widgetItem.Name);

            View.HasController <SnapshotTableWidgetController>();

            View.HasConfig(p => p);
            View.DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <SnapshotTableTransformer>()
            .HasProperty(t => t.IsTopTable).WithValue(true)
            .HasProperty(t => t.MeasureValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.AbsoluteTousandValue).WithValue(p => p[ParameterList.AbsoluteThousandFilter]);
            //.HasProperty(t => t.ShowFullLength).WithValue(widgetItem.Name == WidgetItems.TopSubBrandSnapShotTable().Name || widgetItem.Name == WidgetItems.TopSKUSnapShotTable().Name);

            Export.HasController <SnapshotTopTableExportController>()
            .DataFlow.AddSource <CubeDataSourceBase>()
            .WithModule(widgetItem.ViewId)
            .Transform().By <CubeDataToXTableSnapshotTransformer>()
            .HasProperty(t => t.IsTopTable).WithValue(true)
            .HasProperty(t => t.AbsoluteThousandValue).WithValue(p => p["absoluteThousandConversion"])
            .Transform().By <ExportSnapshotModelTransformer>()
            .HasProperty(t => t.MeasureText).WithValue(p => p[ParameterList.TypeOfMeasure])
            .HasProperty(t => t.NavigationNameString).WithValue(p => p["Navigation_Label"])
            .HasProperty(t => t.Region).WithValue(p => p["@@" + ParameterList.RegionOrCluster + "_text"])
            .HasProperty(t => t.Country).WithValue(p => p["@@" + ParameterList.Country + "_text"])
            .HasProperty(t => t.Segment).WithValue(p => p["@@" + ParameterList.Segment + "_text"])
            //.HasProperty(t => t.Forms).WithValue(p => p["@@" + ParameterList.Form + "_text"])
            .HasProperty(t => t.UnitOrValue).WithValue(p => p["@@" + ParameterList.UnitOrValue + "_text"])
            .HasProperty(t => t.TimePeriodText).WithValue(p => p["@@" + ParameterList.TimePeriod + "_text"])
            .HasProperty(t => t.EndDate).WithValue(p => p["@@" + ParameterList.EndDate + "_text"]);


            HasParameterDependency.On(widgetItem.HasParamDependency);
        }