如何根据特定条件将记录从主表复制到另一个表 [英] How to Copy Records from a Master Table to another Table based on specific criteria

查看:95
本文介绍了如何根据特定条件将记录从主表复制到另一个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,其中包含一些设备的默认主任务(EquipmentMasterTasks),我希望能够根据用户标准将特定的记录从EqluipmentMasterTasks复制到另一个名为EquipmentTasks的表中,即(EquipmentType =台式计算机" 一月= true,二月= false,三月= false,四月= true ...,数量= 4).

I have a table with some default master tasks for equipment (EquipmentMasterTasks) I would like to be able to copy specific records from the EqluipmentMasterTasks to another table called EquipmentTasks based on user criteria, ie.(EquipmentType="Desktop Computer" Jan=true, Feb=false, Mar=false, Apr=true..., Quantity = 4).

我希望用户从自动完成"框中选择设备类型,然后输入设备数量,即(4,台式计算机),然后在计划任务的月份中进行检查.例如(Jan,Feb,Mar,Apr,...). 然后,该应用会将记录从设备主任务"复制到设备任务"表中,以选择所选设备的类型,并为指定的数量创建设备名称,并在设备末尾附加一个数字(例如,台式计算机01,台式计算机02, ...),并将相应的月份设置为指定的每月标准.

I would like the user to select the type of Equipment from a AutoComplete  box and enter the Quantity of pieces of Equipment ie(4, Desktop Computer) and then put a check in the months that the task is scheduled for, ie(Jan, Feb, Mar, Apr,...). Then the app would copy records from the EquipmentMasterTasks to the EquipmentTasks table for type of Equipment chosen, and for the Quantity specified and name the Equipment with a number appended to the end ie.(Desktop Computer 01, Desktop Computer 02, ...) and set the corresponding months to the Monthly Criteria specified.

我想知道哪种方法是最好的方法,我正在使用VB,对您的帮助将不胜感激.

I was wondering what would be the best way to approach this, any help would be greatly appreciated, I am using VB.

谢谢.

推荐答案

对从ACB设置的设备"本地属性使用更改屏幕"事件.

Use a Screen changed event for the Equipment local property that is set from the ACB.

发生更改的事件:

1)添加新行(实体属性)-设置默认值.

1) Add the new row (Entity property) - setting the default values.

2),然后弹出一个模态窗口供用户输入以输入所需的值.当他们关闭模态窗口"时,您已经完成了除保存"之外的所有操作.您可以在模态"窗口中放置一个保存"按钮,或者只是将 用户关闭模态"窗口并保存屏幕(他们会在屏幕导航"选项卡中看到星号).

2) then, pop-up a Modal Window for the user to enter to enter the values you want.  When they close the Modal Window, you've accomplished everything except a Save.  You could put a Save button on the Modal window or just have the User close the Modal window and Save the Screen (they see the asterik in the Screen Navigation Tab).

"LS屏幕"将自动同步所有实例以获得单个Entity记录.添加的行将显示在同一实体的所有实体集合中,直到保存该集合为止.

The LS Screen will automatically sync up all instances for a single Entity record.  Added rows will display in all Entity Collections for the same Entity until the Collection is saved.

如果遇到问题,请发布屏幕快照,然后有人会帮助您前进.

If you get stuck, publish a screen shot of your screen and someone well help you move forward.

欢迎来到LS社区!


这篇关于如何根据特定条件将记录从主表复制到另一个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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