资源简介
适合初学者。
主要功能:教师增减学生资料,增减试题。学生选题、答题,查看成绩。
开发环境:visual studio 2005
数据库: sqlserver 2005
![](http://www.nz998.com/pic/50268.jpg)
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace ExamManageSystem
{
class DataHelp
{
private static string connStr = “server=.\\SQLExpress;database=ExamSystem;Integrated Security=true“;
public static SqlConnection conn = new SqlConnection(connStr);
public static SqlCommand com;
public static DataSet dataSet; //数据集对象
public static SqlDataAdapter dataAdapter; //适配器对象
//将注册的管理员的信息提交到数据库
//参数类型 Admin
//返回值类型 bool
public static bool AdminInfoReferToData(Admin admin)
{
bool result = false;
try
{
conn.Open();
com = new SqlCommand(“uep_EnrolAdmin“ conn);
com.CommandType = CommandType.StoredProcedure;
//获取对象的值,并赋值给存储过程参数
com.Parameters.Add(“@LoginId“SqlDbType.NVarChar50).Value=admin.GetLoginId();
com.Parameters.Add(“@LoginPwd“SqlDbType.NVarChar50).Value=admin.GetLoginPwd();
com.Parameters.Add(“@AdminName“SqlDbType.NVarChar50).Value=admin.GetAdminName();
com.Parameters.Add(“@Sex“SqlDbType.NVarChar2).Value=admin.GetSex();
//执行SQl命令并返回结果
int res = (int)com.ExecuteNonQuery();
if (res == 1)
{
result = true;
MessageBox.Show(“注册成功!“ “系统提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
else
{
MessageBox.Show(“注册失败!\n请稍后再注册“ “系统提示“ MessageBoxButtons.OK MessageBoxIcon.Error);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
conn.Close();
}
return result;
}
//将注册的教员的信息提交到数据库
//参数类型 Teacher
//返回值 bool
public static bool TeacherInfoReferToData(Teacher teacher)
{
bool result = false;
try
{
conn.Open();
com = new SqlCommand(“uep_EnrolTeacher“ conn);
com.CommandType = CommandType.StoredProcedure;
//获取对象的值,并赋值给存储过程参数
com.Parameters.Add(“@LoginId“ SqlDbType.NVarChar 50).Value = teacher.GetLoginId();
com.Parameters.Add(“@LoginPwd“ SqlDbType.NVarChar 50).Value = teacher.GetLoginPwd();
com.Parameters.Add(“@TeacherName“ SqlDbType.NVarChar 50).Value = teacher.GetTeacherName();
com.Parameters.Add(“@Sex“ SqlDbType.NVarChar 2).Value = teacher.GetSex();
//执行SQl命令并返回结果
int res = (int)com.ExecuteNonQuery();
if (res == 1)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 937 2008-12-24 12:17 考试管理系统下载版\ExamManageSystem\ExamManageSystem.sln
..A..H. 100864 2010-04-20 23:00 考试管理系统下载版\ExamManageSystem\ExamManageSystem.suo
文件 445440 2009-01-05 18:53 考试管理系统下载版\ExamManageSystem\使用说明\考试管理系统.doc
文件 176640 2009-01-05 18:53 考试管理系统下载版\ExamManageSystem\使用说明\考试管理系统.ppt
文件 44 2009-01-05 19:01 考试管理系统下载版\ExamManageSystem\使用说明\说明.txt
文件 26909 2008-11-21 14:20 考试管理系统下载版\ExamManageSystem\images\About.jpg
文件 235002 2006-06-29 20:24 考试管理系统下载版\ExamManageSystem\images\bg01.jpg
文件 3553 2001-05-18 04:35 考试管理系统下载版\ExamManageSystem\images\bg02.jpg
文件 7570 1998-05-04 00:00 考试管理系统下载版\ExamManageSystem\images\bg03.jpg
文件 6897 1998-05-04 00:00 考试管理系统下载版\ExamManageSystem\images\bg04.jpg
文件 17147 2002-08-29 09:25 考试管理系统下载版\ExamManageSystem\images\bg05.jpg
文件 3802 2008-11-14 10:53 考试管理系统下载版\ExamManageSystem\images\bg06.jpg
文件 4389 2002-08-29 09:25 考试管理系统下载版\ExamManageSystem\images\bg07.jpg
文件 963 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\cut.gif
文件 7886 2007-08-03 11:07 考试管理系统下载版\ExamManageSystem\images\Icon.ico
文件 982 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\icon_editor_url.gif
文件 927 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\icon_paperclip.gif
文件 729398 2009-01-09 10:08 考试管理系统下载版\ExamManageSystem\images\Login2.bmp
文件 648246 2009-01-09 10:11 考试管理系统下载版\ExamManageSystem\images\loginImage.bmp
文件 1092 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\MP.GIF
文件 990 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\refurbish.gif
文件 963 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\searchAll.gif
文件 468 2005-02-25 01:32 考试管理系统下载版\ExamManageSystem\images\SWF.GIF
文件 8743 2008-12-22 18:50 考试管理系统下载版\ExamManageSystem\ExamManageSystem\DataHelp.cs
文件 13079 2009-01-07 11:49 考试管理系统下载版\ExamManageSystem\ExamManageSystem\ExamManageSystem.csproj
文件 466 2008-12-13 12:10 考试管理系统下载版\ExamManageSystem\ExamManageSystem\FrmAbout.cs
文件 6669 2008-12-13 12:10 考试管理系统下载版\ExamManageSystem\ExamManageSystem\FrmAbout.Designer.cs
文件 58497 2008-12-13 12:10 考试管理系统下载版\ExamManageSystem\ExamManageSystem\FrmAbout.resx
文件 18190 2008-12-24 16:01 考试管理系统下载版\ExamManageSystem\ExamManageSystem\FrmEnrolUsers.cs
文件 23362 2003-01-01 01:06 考试管理系统下载版\ExamManageSystem\ExamManageSystem\FrmEnrolUsers.Designer.cs
............此处省略285个文件信息
- 上一篇:c#+Access图书管理系统
- 下一篇:记事本c# c#
相关资源
- 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#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
- c# 高校档案信息管理系统
- c#向word文件插入图片
- C#左侧导航菜单(动态生成)
评论
共有 条评论