向属性分配值的探针 [英] Probelm with assigning value to property

查看:49
本文介绍了向属性分配值的探针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我创建了带有2个查询的屏幕.每个查询都有一个参数:IdCustomer和UserName.然后,我创建了两个具有相同名称的属性,这些属性已绑定到查询参数.现在,我想为它们分配值InitializeDataWorkspace方法.这应该 看起来像这样:

I created screen with 2 queries. Each query has one parameter: IdCustomer and UserName. Then I created 2 properties with same names, that are binded to query parameter. Now I would like to assign them values in  InitializeDataWorkspace method. It should look somethig like this:

Private Sub ProjektyDetail_InitializeDataWorkspace(将更改保存为列表(Microsoft.LightSwitch.IDataService的列表))
IdCustomer = 7

Private Sub ProjektyDetail_InitializeDataWorkspace(saveChangesTo As List(Of Microsoft.LightSwitch.IDataService))
IdCustomer = 7

UserName = Me.Application.User.Name

UserName = Me.Application.User.Name

如果结束,则
结束

End If
End Sub

现在,第一个属性IdCustomer没问题.但是,当我键入UserName时,它说未声明.不知道为什么.唯一的不同是,当我基于它创建屏幕时,第一个查询是自动创建的.但是我添加了第二个查询 从添加数据项->询问.感谢您的帮助.预先感谢

Now there is no problem with first property IdCustomer. But when I type UserName it says that it is not declared. Have no idea why. Only difference is that first query was created automatically when I created screen based on it. But second query I added from Add Data Item -> Query. Help is appreciated. Thanks in advance

Peter 

Peter 

推荐答案

Peter,欢迎来到LightSwitch.我是高级初学者lightswitch用户(笑).

Hi Peter, and welcome to LightSwitch.  I am an advanced beginning lightswitch user (grin).

执行以下操作将您的媒体资源添加到屏幕上:

Add your property to the screen by doing this:

  1. 创建或打开您的屏幕
  2. 在窗口顶部,单击添加数据项"
  3. 选择本地属性",然后选择所需的类型(整数和字符串表示什么)您已经在上面列出了)
  4. 给它命名,然后单击确定".

设置完成后,您将设置变量,并可以在参数绑定等中使用它们. 您将在左侧看到数据项以及查询.

Once that is set, you will have the variables set and can use them in parameter binding, etc.  You will see your data item along with the queries on the left.

我认为非常酷的是,您可以添加表"作为本地属性(而不是整数或字符串),然后使用该表"作为下拉列表,就像添加了它一样作为查询,使用链接的子表.我去过的很酷的功能 一起玩.

What I think is really cool is that you can add a 'Table' as a local property (instead of an integer or a string), then use that 'Table' as a drop down, just as if you had added it as a query, using the linked child tables.  A cool feature I've been playing around with.


这篇关于向属性分配值的探针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆