private void button1_Click(object sender, EventArgs e)
{
if (this.userb.Text == null || this.userb.Text == "" || this.pwdb.Text == null || this.pwdb.Text == "")
{
MessageBox.Show("请把用户名、密码信息框填完整");
}
else
{
string husers, hupws;
husers = this.userb.Text.Trim();
hupws = this.pwdb.Text.Trim();
string sql = "select count(*) from 登录账户 where Userid='" + husers + "' and Pwd='" + hupws + "'";
if (GetCount(sql) > 0)
{
Form2 j = new Form2();
j.Show();
this.Hide();
}
else
{
MessageBox.Show("用户名密码错误 请重新输入!!!");
}
}
}
public int GetCount(string sql)
{
SqlConnection cons = dss.Create();
SqlCommand cmd = new SqlCommand(sql, cons);
cons.Open();
int count = (int)cmd.ExecuteScalar();
cons.Close();
return count;
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/63880910252610.958426057129756.png)
有哪位知道这篇文档里采用的编程语言是啥吗?(下面是效果图)
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
4条回答 默认 最新
- CSDN专家-showbo 2021-07-02 13:11关注
C# WinForm的代码,有帮助能点个采纳吗 ,谢谢~
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 基于单片机的靶位控制系统
- ¥15 AT89C51控制8位八段数码管显示时钟。
- ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
- ¥15 下图接收小电路,谁知道原理
- ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
- ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
- ¥15 手机接入宽带网线,如何释放宽带全部速度
- ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
- ¥15 ETLCloud 处理json多层级问题
- ¥15 matlab中使用gurobi时报错