用链接中多个表中的值填充表单 [英] fill a form with values from multiple tables linked in a relation

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

问题描述

表单具有以下布局

A form has the following layout

1. Id_no        : ------ (txt_Id_no.Text)

2. First_Name   : ------ (txt_First_Name.Text)

3, Last_Name    : ------ (txt_Last_Name.Text)

4. Home_Town    : ------ (txt_Home_Town.Text)

5. Dept_Code    : ______ (txt_Dept_Code.Text)

6. Dept_Name    : ------ (txt_Dept_Name.Text)

7. Branch_Code  : ------- (txt_Branch_Code.Text)

8. Branch_Name  : ------ (txt_Branch_Name.Text)


保存到主表中的文件:个人


which saves into a master table : Personnal

table:: Personnal
--------------------------
 Id_no         variable(5)       
 First_Name    variable(15)    
 Last_Name     variable(15)    
 Home_Town     variable(15)    
 Dept_Code     variable(15)    
 Dept_Name     variable(15)    
 Branch_Code   variable(15)    
 Branch_Name   variable(15)    


table :: Department
-------------------------
Dept_Code   variable(5)    
Dept_Name   variable(5)    
Dept_Short  variable(5)    


table  :: Branch
-------------------------

Branch_Code   variable(5)    
Branch_Name   variable(5) 
ranch_Short   variable(5)  



一种. 部门详细信息(即部门代码,部门名称)和
分支详细信息(即Branch_Code,Branch_Name)输入

文本框



a. The department details (i.e. Dept_Code, Dept_Name) and
branch details (i.e Branch_Code,Branch_Name) feed into

the text boxes

5. Dept_Code    : ______ (txt_Dept_Code.Text)

6. Dept_Name    : ------ (txt_Dept_Name.Text)

7. Branch_Code  : ------- (txt_Branch_Code.Text)

8. Branch_Name  : ------ (txt_Branch_Name.Text)



当txt_Dept_Code.Text的内容与
相匹配时,通过列表框或网格视图
部门的内容不会显示,只有在没有匹配项时才会显示.



请求.

请提供示例代码和链接以使我能够完成上述

或适当的演练


谢谢

C#编程的新手.

M



via either a list box or grid view when the content of txt_Dept_Code.Text matches the

the content of the Department the popup doesn''t appear, it only comes up with after the comparison there is no match.



Request.

Pls provide a sample codes and links to enable me accomplish the above

or a suitable walk through


Thanks

New to C# programming .

M

推荐答案

您无法获得与要求完全匹配的源代码.

因此,您必须根据自己的问题进行研究和实施.您可以开始探索您提到的ASP.NET控件.了解如何使用它们以及如何将数据绑定到它们.

然后,您可以在SQL的帮助下查询数据库表,以便将结果绑定到控件.

因此,从Google或Bing或Code Project开始.
You can''t get source codes exactly matching with the requirements.

So, you have to study and implement according to your problem. You can start exploring the ASP.NET controls which you have mentioned. Learn how they are used and how data in bound to them.

After that, you can then go and query the database tables with the help of SQL, so that you can bind the results to the controls.

So, start from Google or Bing or Code Project.


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

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