在单个表中插入2表单值 [英] Insert 2 form value in a single table

查看:71
本文介绍了在单个表中插入2表单值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



在我的项目中,我有一个订单。因此,我将进入的领域很少。

然后在同一页面我有一个按钮,它将打开一个单独的窗口,其中包含传输详细信息。

所以在输入传输详细信息并按下OK按钮后,我将返回订单并单击保存按钮。

所以那时它应该将订单和运输价值保存到一张桌子上。

请告诉我怎么做...



谢谢

解决方案

看到这个链接你可能会有所了解



http://stackoverflow.com/questions / 7902095 /如何传递值 - 两页在wpf之间 [ ^ ]





在Windows应用程序中你可以使用构造函数在窗口之间传递值

嘿,我假设你对数据库上的DML操作有点了解。

1.您可以使用您创建的相同对象获取第二个表单的值,以显示第二个表单,例如

表格1



form2 f2 = new form2();

f2.show();



同样的f2可以用于获取Form2字段的值,如



string name = f2.textBox1.Text;



OR

2.你可以使用ArrayList来跟踪form2的值,你可以再次使用相同的例子。 f2获取ArrayList对象并知道字段值。


Hi all

In my project i have an order form.so there are few fields which i will be entering.
Then in the same page i have a button which will open a separate window which contains the transport details.
so after entering the transport detail and pressing OK button, i will be back to the order form and click on SAVE button.
So at that time it should save both the order and transport values to a single table.
please tell me how to do this..

Thank you

解决方案

see this link you may get some idea

http://stackoverflow.com/questions/7902095/how-to-pass-values-between-two-pages-in-wpf[^]


IN windows application you can pass values between the windows by using constructor


Hey , I assume you have little bit idea of DML operation on database.
1. You can get the value of your second form with the same object that you create to show the second form, like
In form1

form2 f2=new form2();
f2.show();

same f2 can be used to get the value of field of Form2 like

string name= f2.textBox1.Text;

OR
2. You can use ArrayList to keep track of values of form2 and again you can use the same eg. f2 to get the ArrayList object and know the fields values.


这篇关于在单个表中插入2表单值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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