⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 student_paper_part.cs

📁 在线 图书网上购物系统
💻 CS
字号:
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.Common;
using System.Web.Management;
//该源码下载自www.51aspx.com(51aspx.com)

#region Student_Paper_Part
	/// <summary>
	/// This object represents the properties and methods of a Student_Paper_Part.
	/// </summary>
	public class Student_Paper_Part
	{
		protected short _id;
		protected int _canididatePaperID;
		protected short _paper_PartID;
		protected string _docName = String.Empty;
		protected string _docPath = String.Empty;
		protected bool _isFinished;
		protected bool _isTeacherChecked;
		protected DateTime _uploadDate;
		protected DateTime _lastModifyDate;
		
		public Student_Paper_Part()
		{
		}
		
		public Student_Paper_Part(short id)
		{
            DbDataReader reader = DataAccess.ExecuteDataReader("usp_SelectStudent_Paper_Part",
                false, new object[] { id });
			if (reader.Read()) 
			{
				this.LoadFromReader(reader);
				reader.Close();
			}
			else
			{
				if (!reader.IsClosed) reader.Close();
				throw new ApplicationException("Student_Paper_Part does not exist.");
			}
		}
		
		public Student_Paper_Part(DbDataReader reader)
		{
			this.LoadFromReader(reader);
		}

        protected void LoadFromReader(DbDataReader reader)
		{
			if (reader != null && !reader.IsClosed)
			{
				_id = reader.GetInt16(0);
				if (!reader.IsDBNull(1)) _canididatePaperID = reader.GetInt32(1);
				if (!reader.IsDBNull(2)) _paper_PartID = reader.GetInt16(2);
				if (!reader.IsDBNull(3)) _docName = reader.GetString(3);
				if (!reader.IsDBNull(4)) _docPath = reader.GetString(4);
				if (!reader.IsDBNull(5)) _isFinished = reader.GetBoolean(5);
				if (!reader.IsDBNull(6)) _isTeacherChecked = reader.GetBoolean(6);
				if (!reader.IsDBNull(7)) _uploadDate = reader.GetDateTime(7);
				if (!reader.IsDBNull(8)) _lastModifyDate = reader.GetDateTime(8);
			}
		}
		
		#region Public Properties
		public short Id
		{
			get {return _id;}
		}
		
		public int CanididatePaperID
		{
			get {return _canididatePaperID;}
			set {_canididatePaperID = value;}
		}

		public short Paper_PartID
		{
			get {return _paper_PartID;}
			set {_paper_PartID = value;}
		}

		public string DocName
		{
			get {return _docName;}
			set {_docName = value;}
		}

		public string DocPath
		{
			get {return _docPath;}
			set {_docPath = value;}
		}

		public bool IsFinished
		{
			get {return _isFinished;}
			set {_isFinished = value;}
		}

		public bool IsTeacherChecked
		{
			get {return _isTeacherChecked;}
			set {_isTeacherChecked = value;}
		}

		public DateTime UploadDate
		{
			get {return _uploadDate;}
			set {_uploadDate = value;}
		}

		public DateTime LastModifyDate
		{
			get {return _lastModifyDate;}
			set {_lastModifyDate = value;}
		}
		#endregion
		
		public static Student_Paper_Part GetStudent_Paper_Part(short id)
		{
			return new Student_Paper_Part(id);
		}

        public static int Update(Student_Paper_Part spp)
        {
            return DataAccess.ExecuteNonQuery("usp_UpdateStudent_Paper_Part", false,
                new object[] { 
                spp.Id,spp.CanididatePaperID,
                    spp.Paper_PartID,spp.DocName,spp.DocPath,
                    spp.IsFinished,spp.IsTeacherChecked,
                    spp.UploadDate,spp.LastModifyDate
                }
                );
        }
        public static int Insert(Student_Paper_Part spp)
        {
            return DataAccess.ExecuteNonQuery("usp_InsertStudent_Paper_Part", false,
                new object[] { 
                    spp.CanididatePaperID,
                    spp.Paper_PartID,spp.DocName,spp.DocPath,
                    spp.IsFinished,spp.IsTeacherChecked,
                    spp.UploadDate,spp.LastModifyDate
                }
                );
        }

	}
	#endregion

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -