public void Initialize()
        {
            exportModel = ServiceLocator.Current.GetInstance <MainViewModel>().export;
            rLastPeriod = ServiceLocator.Current.GetInstance <DashboardViewModel>().LastPeriod;

            productionList = exportModel.productionList;

            produceItemProductionList = new List <produceItemsItem>();
            WorkplacesTimesNew        = new ObservableCollection <WorkplaceTimeModel>();

            workspaces   = WorkspacesModel.GetInstance().GetWorkspaces();
            produceItems = ProduceItemsModel.GetInstance().GetProduceItems();

            produceItemProductionList = ProduceItemsModel.GetInstance().GetProduceItems();

            workspaces.ForEach(w =>
            {
                string description = w.label.de;
                var shift          = 1;
                var model          = new WorkplaceTimeModel(w.id, description, 0, 0, 0, 0, 0, shift, 0);
                WorkplacesTimesNew.Add(model);
            });

            calcSetUpNew();

            productionList.ForEach(i => calculateProductionTimeNew(i.article, i.quantity));

            createMapOldTimeOrdersInWork(rLastPeriod);

            createMapOldWaitinglistWorkstations(rLastPeriod);

            oldSetUpTime(rLastPeriod, produceItems);

            calculate();
        }
        private void CloseWindow(Window window)
        {
            var workplaces = WorkspacesModel.GetInstance().GetWorkspaces().ToList();

            Workspaces = new ObservableCollection <workspacesWorkspace>(workplaces);
            window?.Close();
        }