• 大小: 368KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-07
  • 语言: C#
  • 标签: ASP.NET  

资源简介

if (!Page.IsPostBack) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("Name", typeof(string))); string serverPath = Server.MapPath("File"); DirectoryInfo dir = new DirectoryInfo(serverPath); foreach (FileInfo fileNam

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Collections;
using System.Data.SqlClient;
using OnLineExam.DataAccesslayer;
using OnLineExam.DataAccessHelper;


namespace OnLineExam.BusinessLogiclayer
{
    //考试科目类
    public class Course
    {
        #region 私有成员
        private int _ID;                                               //题目编号            
        private string _Name;                                         //题目        

        #endregion 私有成员

        #region 属性

        public int ID
        {
            set
            {
                this._ID = value;
            }
            get
            {
                return this._ID;
            }
        }
        public string Name
        {
            set
            {
                this._Name = value;
            }
            get
            {
                return this._Name;
            }
        }
        
        #endregion 属性

        #region 方法
        
        //向Course表中添加考试科目信息
        //输出:
        //      插入成功:返回True;
        //      插入失败:返回False;
        public bool InsertByProc()
        {
            SqlParameter[] Params = new SqlParameter[1];

            Database DB = new Database();

            Params[0] = DB.MakeInParam(“@Name“ SqlDbType.VarChar 50 Name);               //考试科目名称           

            int Count = -1;
            Count = DB.RunProc(“Proc_CourseAdd“ Params);
            if (Count > 0)
                return true;
            else return false;
        }

        //更新科目的信息
        public bool UpdateByProc(int CID)
        {
            SqlParameter[] Params = new SqlParameter[2];

            Database DB = new Database();

            Params[0] = DB.MakeInParam(“@ID“ SqlDbType.Int 4 CID);               //用户编号            
            Params[1] = DB.MakeInParam(“@Name“ SqlDbType.VarChar 200 Name);      //用户权限           

            int Count = -1;
            Count = DB.RunProc(“Proc_CourseModify“ Params);
            if (Count > 0)
                return true;
            else return false;
        }
        
        //删除科目
        //输入:
        //      CID - 科目编号;
        //输出:
        //      删除成功:返回True;
        //      删除失败:返回False;
        public bool DeleteByProc(int CID)
        {
            SqlParameter[] Params = new SqlParameter[1];

            Database DB = new Database();

            Params[0] = DB.MakeInParam(“@ID“ SqlDbType.Int4 CID);               //科目编号          
            
            int Count = -1;
            Count = DB.RunProc(“Proc_CourseDelete“ Params);
            if (Count > 0)
                return true;
            else return false;
        }
        
        //查询所用考试科目
        //不需要参数
        public DataSet QueryCourse()
        {
            Database DB = new Database();           
            return DB.GetDataSet(“Proc_CourseList“);
        }
        
        #endregion 方法
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        410  2002-12-30 01:40  chinaz.com.txt

     文件       4752  2008-06-02 12:16  源码必读.txt

     文件       3247  2009-11-06 17:10  说明.htm

     文件        203  2007-05-11 10:54  Controls\lefttree.ascx

     文件       3349  2008-05-25 19:50  Web\CourseAdd.aspx

     文件       4654  2008-05-25 19:32  Web\CourseManage.aspx

     文件        446  2008-05-20 22:31  Web\Default.aspx

     文件       3900  2008-05-25 19:50  Web\DepartmentAdd.aspx

     文件       4253  2008-05-25 19:32  Web\DepartmentManage.aspx

     文件       4235  2008-05-25 19:46  Web\FillBlankAdd.aspx

     文件       4451  2008-05-25 19:50  Web\FillBlankManage.aspx

     文件       4076  2008-05-25 19:32  Web\JudgeAdd.aspx

     文件       4314  2008-05-25 19:46  Web\JudgeManage.aspx

     文件       4034  2008-05-26 21:36  Web\Login.aspx

     文件       6147  2008-05-25 19:46  Web\MultiSelectAdd.aspx

     文件       4336  2008-05-25 19:50  Web\MultiSelectManage.aspx

     文件      13579  2008-05-25 19:33  Web\PaperDetail.aspx

     文件       5633  2008-05-25 19:33  Web\PaperLists.aspx

     文件      22835  2008-05-25 19:45  Web\PaperSetup.aspx

     文件      15488  2008-05-28 12:25  Web\PaperSetup2.aspx

     文件       4314  2008-05-25 19:43  Web\PwdModify.aspx

     文件       4102  2008-05-25 19:50  Web\QuestionAdd.aspx

     文件       4352  2008-05-25 19:46  Web\QuestionManage.aspx

     文件       4640  2008-05-25 19:33  Web\Role.aspx

     文件       3350  2008-05-25 19:33  Web\RoleAdd.aspx

     文件       5863  2008-05-25 19:44  Web\RoleManage.aspx

     文件       6089  2008-05-25 19:50  Web\SingleSelectAdd.aspx

     文件       4293  2008-05-25 19:46  Web\SingleSelectManage.aspx

     文件       8816  2008-05-25 19:29  Web\StudentIndex.aspx

     文件      11088  2007-03-05 17:26  Web\TestAnswer.aspx

............此处省略131个文件信息

评论

共有 条评论