键入一个员工代码后,emplyee的其他详细信息将自动填充到其他文本框中. [英] When one employee code is typed , other details of emplyee automatically fill the other textboxes..

查看:120
本文介绍了键入一个员工代码后,emplyee的其他详细信息将自动填充到其他文本框中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用c#创建了一个asp.net网站.我的问题如下:
(1)当客​​户将给定的代码输入客户代码文本框中时,按回车键时,其他客户详细信息(例如fname,lname,email-address和company name)将自动填写其相关文本框.(我已经拥有全部我的数据库表中的这5列).
(2)当所有五个文本框均填充有正确的数据时,这些字段应锁定为不可编辑的字段.
(3)如果客户代码存在,则应在该表格上显示一条消息,没有客户在我们的记录中注册.
请帮助,如果有任何机构可以发送完整的代码给我. AMIR

Hi, I creating a asp.net website with c#. My Question is as follows:
(1)When a client put his given code in the client code text box,when he/she press enter ,the other client details like fname,lname,email-address and company name fill automatically their related textboxes.(I already have all these 5 columns in my database table).
(2)when the all five textboxes are filled with their correct data ,these field should be locked as a non-editable fields.
(3)if the client code dosent exist ,a message should be display on that form That "No client is registered in our records.
Kindly help ,,send me complete code if any body can do that.!
AMIR

推荐答案

我们不做您的作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试一下,您可能会发现它并不像您想的那么难.
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as hard as you think.


1:既然您现在有了客户端代码(当然,您将在继续之前进行验证),将使用按钮的clieck事件中的代码作为存储过程的参数,以从数据库中检索其余的详细信息,然后在Labels中显示这些详细信息(如果不进行编辑则不是TextBoxes). > 2:因为它们是< asp:label xmlns:asp =#unknown">控件而不是文本框.
3:这是上面1中提到的验证的一部分.您将需要验证输入的代码在数据库中是否存在.使用javascript和网络方法(一种方法-有其他方法)以确保输入的代码正确.使用ValidationSummary控件显示任何消息.
3:我们不做作业,我们永远不会只提供代码,但今天早上我感到很温暖和舒适,所以至少您有一个过程.享受吧.
1: Given that you now have the client code (which, of course, you will validate before proceeding) you would use the code inside the clieck event of the button as a parameter to a stored procedure to retrieve the rest of the details from the database and then display those details in Labels (not TextBoxes if they are not to be edited).
2: is moot as they are <asp:label xmlns:asp="#unknown"> controls rather than textboxes.
3: This is part of the validation mentioned in 1 (above). You would need to validate that the code entered exists on the database. Use javascript and web methods (one way - there are others) to ensure that the code entered is correct. Use a ValidationSummary control to display any messages.
3: We don''t do homework and we''ll never just supply the code but I''m feeling all warm and cosy this morning so at least you have a process. Enjoy.


这篇关于键入一个员工代码后,emplyee的其他详细信息将自动填充到其他文本框中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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