您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->多功能在线考试系统源码>>App-Code/BusinessLogicLayer/Scores.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:多功能在线考试系统源码
当前文件:文件类型 OnLineExam/App_Code/BusinessLogicLayer/Scores.cs打开代码结构图
高亮显示
		            using System;
using System.Data;
using System.Collections;
using System.Data.SqlClient;
using MyOnLineExam.DataAccessLayer;
using MyOnLineExam.DataAccessHelper;


namespace MyOnLineExam.BusinessLogicLayer
{
    //用户类
    public class Scores
    {
        #region 私有成员
        private int _ID;                                                //用户编号
        private string _userID;                                         //用户密码
        private int _paperID;                                           //用户权限
        private int _score;                                             //用户姓名             
       
        #endregion 私有成员

        #region 属性

        public int ID
        {
            set
            {
                this._ID = value;
            }
            get
            {
                return this._ID;
            }
        }
        public string UserID
        {
            set
            {
                this._userID = value;
            }
            get
            {
                return this._userID;
            }
        }
        public int PaperID
        {
            set
            {
                this._paperID = value;
            }
            get
            {
                return this._paperID;
            }
        }
        public int Score
        {
            set
            {
                this._score = value;
            }
            get
            {
                return this._score;
            }
        }       
       
        
        #endregion 属性

        #region 方法

        //向Score表中添加成绩
        //输出:
        //      插入成功:返回True;
        //      插入失败:返回False;
        public bool InsertByProc()
        {
            SqlParameter[] Params = new SqlParameter[3];

            DataBase DB = new DataBase();

            Params[0] = DB.MakeInParam("@UserID", SqlDbType.VarChar, 20, UserID);               //用户编号
            Params[1] = DB.MakeInParam("@PaperID", SqlDbType.Int,4, PaperID);                   //用户密码
            Params[2] = DB.MakeInParam("@Score", SqlDbType.Int,4, Score);                       //用户权限
                       

            int Count = -1;
            Count = DB.RunProc("Proc_ScoreAdd", Params);
            if (Count > 0)
                return true;
            else return false;
        }
        
        //删除成绩
        //输入:
        //      XUserID - 用户编号;
        //输出:
        //      删除成功:返回True;
        //      删除失败:返回False;
        public bool DeleteByProc(int SID)
        {
            SqlParameter[] Params = new SqlParameter[1];

            DataBase DB = new DataBase();

            Params[0] = DB.MakeInParam("@ID", SqlDbType.Int,4, SID);               //成绩编号          
            
            int Count = -1;
            Count = DB.RunProc("Proc_ScoreDelete", Params);
            if (Count > 0)
                return true;
            else return false;
        }
        
        //查询所用成绩
        //不需要参数
        public DataSet QueryScore()
        {
            DataBase DB = new DataBase();           
            return DB.GetDataSet("Proc_ScoreList");
        }       

        #endregion 方法
    }
}

        
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:多功能在线考试系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号