资源简介
计算机实训课程设计的代码----使用C#和SQL 大概写了一个学生信息管理系统,数据库没得做关联分析,运行界面也没有做太多的完善,代码有太多不足,希望谅解。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class ChangePass : Form
{
public static string UserID = ““;
public ChangePass()
{
InitializeComponent();
this.skinEngine1 = new Sunisoft.IrisSkin.SkinEngine(((System.ComponentModel.Component)(this)));
this.skinEngine1.SkinFile = Application.StartupPath + “//SteelBlue.ssk“;
}
private void button1_Click(object sender EventArgs e)
{
string sql = “select Password from UserInformation where UserID=‘“ + textBox1.Text + “‘“;
SQLServerDatabase sql1 = new SQLServerDatabase();
SqlConnection cn = sql1.coon();
cn.Open();
SqlCommand cmd = new SqlCommand(sql cn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
string oldPwd = dr.GetString(0).Trim();
//获取数据库的中的旧的密码,与现在输入的密码做比较
if (oldPwd == textBox2.Text)
{
if (textBox3.Text.Trim() == ““ || textBox4.Text.Trim() == ““)
{
MessageBox.Show(“新密码确认不能为空!“);
return;
}
else if (textBox3.Text.Trim() != textBox4.Text.Trim())
{
MessageBox.Show(“2次输入的新密码不一样请重新输入!“);
textBox3.Text = ““;
textBox4.Text = ““;
return;
}
else
{
dr.Close();
string sqlUpdate = “update UserInformation set Password =‘“ + textBox4.Text +
“‘ where UserID =‘“ + textBox1.Text + “‘“;
SqlCommand cmdUp = new SqlCommand(sqlUpdate cn);
if (cmdUp.ExecuteNonQuery() == 0)
{
MessageBox.Show(“未知错误!“);
return;
}
else
{
MessageBox.Show(“恭喜你!密码修改成功!“);
new System.Threading.Thread(() =>
{
Application.Run(new Form1());
}).Start();
this.Close();
}
}
}
else
{ MessageBox.Show(“旧密码错误或者不能为空“);
textBox2.Text = ““;
textBox3.Text = ““;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13176 2020-01-07 10:05 WindowsFormsApplication12\123.sql
文件 187 2019-12-27 09:05 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\App.config
文件 557056 2010-09-12 13:09 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\IrisSkin4.dll
文件 15664 2010-04-04 21:03 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\mp10green.ssk
文件 569745 2020-01-02 17:57 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\Setup.exe
文件 31327 2010-04-04 21:03 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\SteelBlue.ssk
文件 5900 2020-01-02 17:56 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\Unti
文件 187904 2020-01-02 17:31 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.exe
文件 187 2019-12-27 09:05 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.exe.config
文件 118272 2020-01-02 17:31 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.pdb
文件 24224 2019-12-27 10:39 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.vshost.exe
文件 187 2019-12-27 09:05 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.vshost.exe.config
文件 490 2018-09-15 15:29 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Debug\WindowsFormsApplication3.vshost.exe.manifest
文件 557056 2010-09-12 13:09 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\IrisSkin4.dll
文件 15664 2010-04-04 21:03 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\mp10green.ssk
文件 194488 2020-01-02 17:53 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\Setup.exe
文件 31327 2010-04-04 21:03 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\SteelBlue.ssk
文件 3497 2020-01-02 17:52 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\Unti
文件 185856 2020-01-02 17:51 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.exe
文件 187 2019-12-27 09:05 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.exe.config
文件 97792 2020-01-02 17:51 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.pdb
文件 24224 2020-01-02 17:50 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.vshost.exe
文件 187 2019-12-27 09:05 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.vshost.exe.config
文件 490 2018-09-15 15:29 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.vshost.exe.manifest
文件 3697 2019-12-31 19:36 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\ChangePass.cs
文件 8139 2019-12-31 19:36 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\ChangePass.Designer.cs
文件 20816 2019-12-31 19:36 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\ChangePass.resx
文件 4195 2020-01-02 17:30 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\DataAnalyse.cs
文件 10962 2020-01-02 11:49 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\DataAnalyse.Designer.cs
文件 20989 2020-01-02 11:49 WindowsFormsApplication12\WindowsFormsApplication3\WindowsFormsApplication3\DataAnalyse.resx
............此处省略112个文件信息
- 上一篇:c#多文档处理程序
- 下一篇:lianjia.csv
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
评论
共有 条评论