Пример #1
0
        private void processCurrentObjectController_CustomProcessSelectedItem(object sender, CustomProcessListViewSelectedItemEventArgs e)
        {
            fmCSAStatementAccount current = View.CurrentObject as fmCSAStatementAccount;

            if (current == null)
            {
                return;
            }

            // Show object
            string DetailViewId = Frame.Application.FindDetailViewId(current.GetType());

            IObjectSpace objectSpace = Frame.Application.CreateObjectSpace();
            BaseObject   passedObj   = objectSpace.GetObject <BaseObject>(current);

            TargetWindow       openMode = TargetWindow.NewWindow;
            DetailView         dv       = Frame.Application.CreateDetailView(objectSpace, DetailViewId, true, passedObj);
            ShowViewParameters svp      = new ShowViewParameters()
            {
                CreatedView = dv, TargetWindow = openMode, Context = TemplateContext.View, CreateAllControllers = true
            };

            e.InnerArgs.ShowViewParameters.Assign(svp);
            e.Handled = true;
        }
Пример #2
0
        private void Open_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            fmCSAStatementAccount current = e.CurrentObject as fmCSAStatementAccount;

            if (current == null)
            {
                return;
            }

            // Show object
            string DetailViewId = Frame.Application.FindDetailViewId(current.GetType());

            IObjectSpace objectSpace = Frame.Application.CreateObjectSpace();
            BaseObject   passedObj   = objectSpace.GetObject <BaseObject>(current);

            TargetWindow       openMode = TargetWindow.NewWindow;
            DetailView         dv       = Frame.Application.CreateDetailView(objectSpace, DetailViewId, true, passedObj);
            ShowViewParameters svp      = new ShowViewParameters()
            {
                CreatedView = dv, TargetWindow = openMode, Context = TemplateContext.View, CreateAllControllers = true
            };

            e.ShowViewParameters.Assign(svp);
        }