Asp.net在线考试系统源码及毕业设计论文


在线考试系统源码、毕业设计论文,完整版、计算机科学与技术、ASP、.NET
资源截图
代码片段和文件信息
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;


namespace ExamOnline
{
//该源码下载自www.51aspx.com(51aspx.com)

    /// 
    /// AutoExercise 的摘要说明:在线练习--自动组卷的功能实现
    /// 

    public class AutoExercise
    {
        string strcon = ““;   //连接字符串

        /// 
        /// 构造函数,连接字符串
        /// 

        public AutoExercise()   
        {
            if (strcon == ““)
            {
                if (HttpContext.Current.Application[“strcon“] == null)
                {
                    string path = HttpContext.Current.Request.PhysicalApplicationPath + “DBSet.ini“;//获取文件物理路径
                    StreamReader sr = new StreamReader(path System.Text.Encoding.Default);
                    strcon = sr.ReadLine();//读取文件内容
                    HttpContext.Current.Application[“strcon“] = strcon;
                }
                else
                {
                    strcon = HttpContext.Current.Application[“strcon“].ToString();
                }
            }
        }

        /// 
        /// 用SQL语句绑定GridView
        /// 

        /// 要绑定的GridView
        /// SQL语句
        public void bindGV(GridView gv string strcmd)
        {
            SqlDataSource sqlds = new SqlDataSource();
            sqlds.ConnectionString = strcon;
            sqlds.SelectCommandType = SqlDataSourceCommandType.Text;
            sqlds.SelectCommand = strcmd;
            gv.DataSource = sqlds;
            gv.DataBind();
        }

        /// 
        /// 取得一门课程某题型难度的最大值
        /// 

        /// 
        /// 
        /// 
        public int getQlevel(string cid int sid)
        {
            SqlConnection con = new SqlConnection(strcon);
            string strcmd = “select max(qlevel) from questions where cid=‘“ + cid + “‘ and sid=‘“ + sid + “‘“;
            SqlCommand cmd = new SqlCommand(strcmd con);
            con.Open();
            int heighLevel =Convert.ToInt32(cmd.ExecuteScalar());
            con.Close();
            return heighLevel;
        }

        /// 
        /// 取得一门课程某题型的总题量
        /// 

        /// 
        /// 
        /// 
        public int getQNum(string cid int sid)
        {
            SqlConnection con = new SqlConnection(strcon);
            string strcmd = “select count(*) from questions where cid=‘“ + cid + “‘ and sid=‘“ + sid + “‘“;
            SqlCommand cmd = new SqlCommand(strcmd con);
            con.Open();
            int qNum =

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2007-05-21 14:00  App_Code
     文件        2581  2007-05-21 13:59  App_Code51aspx源码必读.txt
     文件       12196  2007-05-21 13:56  App_CodeAutoExercise.cs
     文件        1170  2007-05-14 00:14  App_CodeCommon.cs
     文件       17551  2007-05-21 13:56  App_CodeExam.cs
     文件         773  2007-04-08 14:00  App_CodeexamEnum.cs
     文件        7778  2007-05-20 13:35  App_Codelogin.cs
     文件         125  2007-03-27 14:33  App_Code最新Asp.Net源码下载.url
     目录           0  2007-05-21 12:52  App_Data
     目录           0  2007-05-21 13:42  Bin
     文件      699176  2007-03-28 17:18  BinSystem.Web.Extensions.DLL
     目录           0  2007-05-21 12:54  DB_51aspx
     文件     1310720  2007-05-21 13:59  DB_51aspxExamOnline_Data.MDF
     文件     1835008  2007-05-21 13:59  DB_51aspxExamOnline_Log.LDF
     文件          85  2007-05-21 12:56  DBSet.ini
     文件        1484  2007-05-09 13:01  ExamOnline.sln
     目录           0  2007-05-21 12:52  Images
     文件        6467  2006-12-06 08:05  Imagesloader.gif
     目录           0  2007-05-21 12:52  JS
     文件        1714  2007-05-05 12:06  JSantiCommon.js
     目录           0  2007-05-21 14:00  Students
     文件        2581  2007-05-21 13:59  Students51aspx源码必读.txt
     文件        4781  2007-05-16 21:28  Studentsautoexercise.aspx
     文件        7353  2007-05-15 00:09  Studentsautoexercise.aspx.cs
     文件        2135  2007-05-16 22:11  Studentsautopage.aspx
     文件        7410  2007-05-17 19:58  Studentsautopage.aspx.cs
     文件         580  2007-04-28 14:19  Studentsend.htm
     文件        1333  2007-04-28 14:29  Studentsexamlogin.aspx
     文件         715  2007-05-09 13:02  Studentsexamlogin.aspx.cs
     文件        2681  2007-04-28 14:25  Studentsexamonline.aspx
     文件       13442  2007-04-29 11:16  Studentsexamonline.aspx.cs
............此处省略30个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)