没有合适的资源?快使用搜索试试~ 我知道了~
课程考试辅助系统软件程序
1星 需积分: 10 7 下载量 4 浏览量
2011-03-02
16:45:36
上传
评论
收藏 13KB TXT 举报
温馨提示
试读
12页
网络考试系统是传统考场的延伸,它可以利用网络的无限广阔空间,随时随地对学生进行考试,加上数据库技术的利用,大大简化了传统考试的过程。
资源推荐
资源详情
资源评论
一、 考试、评分模块
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace CES
{
public partial class frmEP : Form
{
public frmEP()
{
InitializeComponent();
}
public int number = 1;//存放题目号
public static int id=1;//存放试题ID
public static string answer = null;//存放相应试题的答案
public static bool IsAnswered=false ;
public static int answeredID = 0;
//向lbxEP中添加试题的方法
private void AppendString()
{
string sqlQ = "select Question from Course where ID='" + list[list_Index] + "'";
string sqlA = "select A from Course where ID=" + list[list_Index] + "";
string sqlB = "select B from Course where ID=" + list[list_Index] + "";
string sqlC = "select C from Course where ID=" + list[list_Index] + "";
string sqlD = "select D from Course where ID=" + list[list_Index] + "";
string sqlR = "select RightAnswer from Course where ID=" + list[list_Index] + "";
string[] EP_Info = { number +"、"+DBhelper.ExecuteScalar(sqlQ).ToString(),"", "A:"
+DBhelper.ExecuteScalar(sqlA).ToString(), "","B:"+DBhelper.ExecuteScalar(sqlB).ToString(), "","C:"
+DBhelper.ExecuteScalar(sqlC).ToString(), "","D:"+DBhelper.ExecuteScalar(sqlD).ToString() };
lbxEP.Items.Clear();
lbxEP.Items.AddRange(EP_Info );
}
/// <summary>
/// 生成试卷的方法
/// </summary>
///
int list_Index = 0;
//集合List,用来随机生成试卷
List<int> list = new List<int>();
private void EP()
{
Random rd = new Random();
int n1 = rd.Next(1, 103);
list.Add(n1);
//for (int i = 0; i <=50; i++)
//{
// int n2 = rd.Next(1,50);
// if (!list.Contains(n2))
// {
// list.Add(n2 );
// }
string sqlB = "select B from Course where ID=" + list[list_Index] + "";
string sqlC = "select C from Course where ID=" + list[list_Index] + "";
string sqlD = "select D from Course where ID=" + list[list_Index] + "";
string sqlR = "select RightAnswer from Course where ID=" + list[list_Index] + "";
string[] EP_Info = { number +"、"+DBhelper.ExecuteScalar(sqlQ).ToString(),"", "A:"
+DBhelper.ExecuteScalar(sqlA).ToString(), "","B:"+DBhelper.ExecuteScalar(sqlB).ToString(), "","C:"
+DBhelper.ExecuteScalar(sqlC).ToString(), "","D:"+DBhelper.ExecuteScalar(sqlD).ToString() };
lbxEP.Items.Clear();
lbxEP.Items.AddRange(EP_Info );
}
/// <summary>
/// 生成试卷的方法
/// </summary>
///
int list_Index = 0;
//集合List,用来随机生成试卷
List<int> list = new List<int>();
private void EP()
{
Random rd = new Random();
int n1 = rd.Next(1, 103);
list.Add(n1);
//for (int i = 0; i <=50; i++)
//{
// int n2 = rd.Next(1,50);
// if (!list.Contains(n2))
// {
// list.Add(n2 );
// }
剩余11页未读,继续阅读
资源评论
- xiao_10122013-11-05只有一段代码
mayongqiangma
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功