创建连接到SQL的Windows窗体应用程序登录名
问题描述:
我创建了一个WindowsForms应用程序登录名,它根据数据库中的值检查凭据.它工作正常,现在我希望我的应用程序根据用户在组合框上选择的值导航到不同的表单.
I have created a windowsForms Application login and it checks the credentials based on the values on the database. it works fine, now i want my application to navigate to different forms based on the value selected by the user(user,officer and Admin) on a combobox.
答
将comboBox的选定值设置为静态变量,然后您可以以任何形式访问该变量
那么您可以根据所选的值进行正确的选择
assing selected value of comboBox to static variable then you can access that variable on any form
then you may assing right depending on selected values