LightSwitch: Passing data from one screen to anoth

2019-07-30 05:45发布

问题:

Is it possible to pass one information from one screen to another?

This is my Main screen:

And I want to add one of the users into where "Leiter" is written.

Some idea how to manage it? Oh yeah, the data is coming from SharePoint...

回答1:

In your List Detail, you need to create a Data Item to store the User Name. In the Properties for that Data Item, you then need to check "Is Parameter".

When you call your second screen from the code in your SearchUserInformationLists screen, you pass the value of that Data Item to it.

this.Application.ShowZeiterfassungsListDetail(this.MyUserName);

The screen Parameters should be the first items in your list of Data Items on the left of the Screen Designer. You can pass more than one parameter and the order that you pass them in is the order in which they are listed in your Data Item list.

this.Application.ShowZeiterfassungsListDetail(this.Param1, this.Param2, this.Param3);