资源简介
计算机实训课程设计的代码----使用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#多文档处理程序
- C#调用大漠插件-找字、找图、截图
- 基于ASP.NET+C#实现的超市管理系统
- C# Winform画图板
- C#单机版考试系统(管理员和学生入口
- C# 视频会议系统
- C# WPF读取任意类型Excel文件(20032007
- 微信支付扫码支付asp.net C#版
- 进销存管理系统+C#源代码
- C# 设计模式 CHM完整版 + C# 设计模式
- c#调用Oracle UDT自定义结构数组类型源
- C#开发的一款百宝箱
- C#开发无人机地面站
- 学生信息管理系统C#winformSQLServer
- fiddlercoreCapture.zip 用 .NET C# 实现 HTTP
- c#HL7通讯测试解析.zip
- 安卓QQ5.8协议 C#版本
- C#仿QQ软件源码
- ArcEngine+C#基本功能很全的代码
- 个人理财系统c#+sql
- 药品管理系统c#编写的
- C# ASP.NET 实战项目源代码 AJAX校内数码
- 《Visual C# + Oracle数据库系统开发全程
- C# winform 播放与录制视频源码
- c# DEV Winform 框架
- WPF开发教程 ----WPF C# 编程 界面开发(
- ASP.NET+C#+SQL校园新闻发布系统
- c# winform twain文件扫描并保存成图片
- ArcEngine 10.0 C#二次开发最新最全帮助文
- 基于C#、SQL学生选课管理系统
评论
共有 条评论