资源简介
基于C#和Mysql的学生信息管理系统,运行.sln文件即可。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace PWMS
{
public partial class F_Login : Form
{
DataClass.MyMeans MyClass = new PWMS.DataClass.MyMeans();
public F_Login()
{
InitializeComponent();
}
private void butClose_Click(object sender EventArgs e)
{
if ((int)(this.Tag) == 1)
{
DataClass.MyMeans.Login_n = 3;
Application.Exit();
}
else
if ((int)(this.Tag) == 2)
this.Close();
}
private void butLogin_Click(object sender EventArgs e)
{
if (textName.Text != ““ & textPass.Text != ““)
{
SqlDataReader temDR = MyClass.getcom(“select * from tb_Login where Name=‘“ + textName.Text.Trim() + “‘ and Pass=‘“ + textPass.Text.Trim() + “‘“);
bool ifcom = temDR.Read();
if (ifcom)
{
DataClass.MyMeans.Login_Name = textName.Text.Trim();
DataClass.MyMeans.Login_ID = temDR.GetString(0);
DataClass.MyMeans.My_con.Close();
DataClass.MyMeans.My_con.Dispose();
DataClass.MyMeans.Login_n = (int)(this.Tag);
this.Close();
}
else
{
MessageBox.Show(“用户名或密码错误!“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
textName.Text = ““;
textPass.Text = ““;
}
MyClass.con_close();
}
else
MessageBox.Show(“请将登录信息添写完整!“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
private void F_Login_Load(object sender EventArgs e)
{
try
{
MyClass.con_open(); //连接数据库
MyClass.con_close();
textName.Text = ““;
textPass.Text = ““;
}
catch
{
MessageBox.Show(“数据库连接失败。“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
Application.Exit();
}
}
private void textName_KeyPress(object sender KeyPressEventArgs e)
{
if (e.KeyChar == ‘\r‘)
textPass.Focus();
}
private void textPass_KeyPress(object sender KeyPressEventArgs e)
{
if (e.KeyChar == ‘\r‘)
butLogin.Focus();
}
private void F_Login_Activated(object sender EventArgs e)
{
textName.Focus();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-07-09 17:27 PWMS\
目录 0 2016-07-09 17:27 PWMS\Databa
文件 3145728 2012-04-20 14:30 PWMS\Databa
文件 2359296 2012-04-20 14:30 PWMS\Databa
目录 0 2016-07-09 17:27 PWMS\DataClass\
文件 4452 2012-04-20 13:54 PWMS\DataClass\MyMeans.cs
文件 3016 2008-03-21 11:00 PWMS\F_Login.cs
文件 6856 2008-03-11 19:09 PWMS\F_Login.designer.cs
文件 341697 2008-03-11 19:09 PWMS\F_Login.resx
文件 7226 2008-03-21 18:43 PWMS\F_Main.cs
文件 38268 2008-03-21 14:36 PWMS\F_Main.designer.cs
文件 1001373 2008-03-21 14:36 PWMS\F_Main.resx
目录 0 2016-07-09 17:27 PWMS\Image\
文件 2909 2008-02-25 16:06 PWMS\Image\01.png
文件 3077 2008-02-25 16:06 PWMS\Image\02.PNG
文件 3241 2008-02-25 16:05 PWMS\Image\03.PNG
文件 2897 2008-02-25 16:05 PWMS\Image\04.PNG
文件 3092 2008-02-25 16:05 PWMS\Image\05.PNG
文件 3525 2008-02-25 16:05 PWMS\Image\06.PNG
文件 2933 2008-02-25 16:04 PWMS\Image\07.PNG
文件 3636 2008-02-25 15:53 PWMS\Image\08.PNG
文件 3042 2008-02-25 15:51 PWMS\Image\09.PNG
文件 29776 2007-12-11 22:05 PWMS\Image\PEOPLE.jpg
文件 659936 2008-02-25 15:44 PWMS\Image\主界面.bmp
文件 1804 2008-02-25 16:08 PWMS\Image\备份.bmp
文件 223716 2008-02-25 15:44 PWMS\Image\登录.BMP
目录 0 2016-07-09 17:27 PWMS\InfoAddForm\
文件 11367 2008-03-11 19:14 PWMS\InfoAddForm\F_Address.Designer.cs
文件 2354 2008-03-26 14:26 PWMS\InfoAddForm\F_Address.cs
文件 5814 2008-03-11 19:14 PWMS\InfoAddForm\F_Address.resx
文件 8024 2008-03-11 19:14 PWMS\InfoAddForm\F_Basic.Designer.cs
............此处省略100个文件信息
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- Asp.net学生信息管理系统源码
- 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#版保龄球记分代码
评论
共有 条评论