简体   繁体   English

combox值更改时更改文本框值

[英]Change textbox value when combox value changes

I have a sql database table login 我有一个SQL数据库表登录

id 
name(nchar 30)
password(nchar 30)
catagory(nchar 10) 

and a loginForm which have a name ComboBox which stores the names and a password TextBox which stores the password and a button login . 还有一个loginForm,它的name ComboBox,用于存储名称; password TextBox,用于存储密码和login按钮。 I have retrive values from the table through databinding property of the combobox and textbox. 我已经通过组合框和文本框的databinding属性从表中检索了值。 It is showing the values but when I change the combobox value it doesn't show the password related to the combobox value? 它显示值,但是当我更改组合框值时,它没有显示与组合框值相关的密码吗? there are 3 different catagories are stored in the table student , teacher and worker I don't know the way how can I retreive catagory value from the table and open different forms mean when I press the login button the catagory is student student form will open? 表格中存储了3种不同的类别studentteacherworker我不知道如何从表格中检索类别值并打开不同的表格,这意味着当我按下登录按钮时,类别为学生的表格将打开?

how can I solve the password and catagory problem? 如何解决密码和分类问题?

您需要在查询中处理该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM