1 / 78
文档名称:

学生学籍管理系统代码.doc

格式:doc   大小:2,756KB   页数:78页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

学生学籍管理系统代码.doc

上传人:aibuaiwo1318 2018/5/16 文件大小:2.69 MB

下载得到文件列表

学生学籍管理系统代码.doc

文档介绍

文档介绍:学生学籍管理系统详细代码
本文为学生学籍管理系统的各个模块效果图和详细代码;
登录模块:
登录模块代码:
using System;
using ;
using ponentModel;
using ;
using ;
using ;
using ;
using ;
namespace StuIFMS
{
public partial class Form1 : Form
{
public Color temp;//存储临时的按钮颜色
public Form1()
{
ponent();
}
private void button3_Click(object sender, EventArgs e)
{
();
}
public User CurrentUser;
private void button2_Click(object sender, EventArgs e)
{
("学生/教师用自己的学号/教师编号登录!,如过没有注册则点击“注册”进行注册!", "提示");
}
private void button1_Click(object sender, EventArgs e)
{
bool UserExit = false, KeyRight = false;
//声明上下文集合
DataClasses1DataContext myDataContext = new DataClasses1DataContext();
//把用户表里所有内容提取到User集合里
//排查输入错误
//用户名为空
if ( == "")
("用户名不能为空!", "提示");
//用户名不为空
else
{
//密码为空
if ( == "")
("密码不能为空", "提示");
//密码不为空
else
{
//学生身份登录
if (==true)
{
var User = from user in
where == "学生"
select user;
foreach (var stu in User)
{
if ( == )
{
UserExit = true;
if ( == )
{
KeyRight = true;
CurrentUser = new User(, , );
}
}
}
if (UserExit == false)
("用户名不存在!");
else
{
if (KeyRight == false)
("密码错误!");
else
{
//("登录成功");
MainForm fm = new MainForm(CurrentUser);
+= new FormClosedEventHandler(fm_FormClosed);
();
(CurrentUser,0);
();
}
}
}
//教师登录
else
{
var User1 = from teacher in
where == "教师"
select teacher;
foreach (var teac in User1)
{
if ( == )
{
UserExit = true;
if ( == )
{