Ejemplo n.º 1
0
        private async void ExecuteCreateWith(object arg)
        {
            if (reportToEdit != null)
            {
                //do an edit with this designer, not a create
                EditWith(arg);
                return;
            }
            // get and set up the right filler and designer
            var metaF    = ReportTypesCV.CurrentItem as IReportType;
            var metaD    = arg as IReportDesigner;
            var designer = designerService.GetDesigner(metaD.Name); // refactored the meta out of here, a bit unnecessary, but if you ever switch back...

            PossibleDesigners = null;
            DesignersCV.MoveCurrentTo(metaD);
            // create report instance and load with designer
            ReportInfo rep = await reprepo.CreateNewAsync(metaF.Name, "New report");

            Reports.Insert(0, rep);
            designer.Load(rep);
            ActiveDesigner = designer;

            ScreenState = ScreenStates.DesignerState;
            raise();
        }