在cration之后创建两个现有项目之间的关系 [英] Create Relationship between two existing items after cration

查看:100
本文介绍了在cration之后创建两个现有项目之间的关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我们创建了两个表格为"0..1"的表格。到n关系。

示例:


表"数据库服务器"和表"数据库"。


一个数据库服务器可以有一个或多个数据库。

数据库可以有零个或一个数据库服务器。

(好吧,没有数据库服务器的数据库没有意义,但这是一个例子;-))



现在我有一个"列表和细节"数据库服务器的屏幕,网格中也有数据库。由lightswitch自动创建。

我可以将 new 数据库添加到数据库服务器。


但是如何在此屏幕中将 现有
数据库添加到我的数据库服务器?

当我向数据库服务器屏幕中的数据库网格添加一个新按钮时,此按钮将打开一个包含所有数据库(网格)的新屏幕,并且我可以编辑数据库条目。 />


有更简单的方法吗?因为添加按钮,生成辅助屏幕等并不是很舒服。


谢谢


问候

解决方案

我的建议是你可以在该屏幕内创建一个模态窗口。  模态窗口包含一个DataGrid / List来显示现有数据库(可能没有服务器?),你应该可以在那里选择项目,还有一个按钮可以将它添加到当前所选服务器的
。 / p>

使默认按钮显示模态窗口不可见。


然后,你可以添加一个按钮来调出模态窗口,把它放在你的位置想。  正确设置CanExecute,如果没有选择数据库服务器,则禁用它。


 


Hello,

we have created two tables with "0..1" to n relationship.
Example:

Table "Database Server" and Table "databases".

One Databse Server can have one or more databases.
A Database can have zero or one Database server.
(OK, a databse without databse server makes no sense, but it is an example ;-) )

Now i have a "list and detail" screen for the database server and there are also the databases in the grid. Automatically created by lightswitch.
There i can add new databases to a database server.

But how can i add existing databases to my database server in this screen?
At the moment i add a new button to the databse-grid in the database server screen, this button opens a new screen with all databases (grid) and there i can edit a database entry.

Is there an easier way? Because adding button, generating the secondary screen etc. is not very comfortable.

Thank you

Regards

解决方案

My suggestion is that you can create a Modal window inside that screen.  The modal window contains a DataGrid/List to show existing database (maybe without a server?), and you should be able to select items there, and also a button to add it to the current selected server.

Make the default button to show the modal window invisible.

Then, you can add a button to bring up the modal window, put it where you want.  Set CanExecute correctly, so it is disabled, if there is no database server selected.

 


这篇关于在cration之后创建两个现有项目之间的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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