Beispiel #1
0
        protected override void RefreshViewCore()
        {
            this.currentCostManager = CostManagerFactory.GetCostManager <TCostLineItem>();

            this.currentCostManager.InitializeAllCostLines();

            this.InitializeCostColumns();

            this.InitializeCostDataGridView();
        }
Beispiel #2
0
        protected override object RunCore(IPluginServiceProvider serviceProvider)
        {
            CostLineType currentCostType = (CostLineType)serviceProvider.GetService(typeof(CostLineType));

            CostManagerFactory costManagerFactory = CostManagerFactory.GetInstance(currentCostType);

            object currentCostManagerObject = EAppRuntime.Instance.CurrentApp.ObjectContainer.Resolve(costManagerFactory.CurrentCostManagerType);

            ProxyGenerator proxyGenerator = new ProxyGenerator();

            var options = new ProxyGenerationOptions();

            options.AddMixinInstance(currentCostManagerObject);

            ICostManager costManager =
                (ICostManager)proxyGenerator.CreateClassProxy <CostManagerFactory>(options);

            costManager.AddCostLine();

            return(costManager.CurrentDisplayedCostLines);
        }