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

📄 studentduty.cs

📁 学生类:Student 教师类:Teacher 主任:AdminTeacher 班主任:MasterTeacher 授课老师: PrelectTeacher 班级类:classTeam 班
💻 CS
字号:
using System;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using DataAccess;
using Forms;

namespace BusinessRule
{
	/// <summary>
	/// StudentDuty 的摘要说明。
	/// 1.	创建一个新的学生缺勤信息实例,才调用默认构造方法
	/// 2.	实例化一个已经存在的学生缺勤信息实例,需要缺勤编号作为参数
	/// </summary>
	public class StudentDuty		//学生缺勤类
	{
		private int afdID;			//编号
		private int stuID;			//学员编号
		private string claID;		//班级编号
		private string afdDate;		//缺勤日期
		private int type;			//缺勤类型
		private int hours;			//缺勤课时
		private string remark;		//备注

		public StudentDuty()
		{
			//默认构造方法
		}

		public StudentDuty(int afdID)
		{
			this.afdID = afdID;
			//获得学员缺勤信息
			SqlDataReader myRd = jimmy.GetStuDutyInfoByAfdID(afdID);
			myRd.Read();
			this.stuID = (int)myRd["stuID"];
			this.claID = myRd["claID"].ToString();
			string date = myRd["afdDate"].ToString();
			string[] afdDate = date.Split(new char[] {' '});
			this.afdDate = afdDate[0];
			this.type = (int)myRd["Type"];
			this.hours = (int)myRd["Hours"];
			this.remark = myRd["Remark"].ToString();
		}
		#region 为成员变量设置属性
		//编号 只读属性
		public int AfdID
		{
			get
			{
				return this.afdID;
			}
		}
		//学员编号 读/写属性
		public int StuID
		{
			get
			{
				return this.stuID;
			}
			set
			{
				this.stuID = value;
			}
		}
		//班级编号 读/写属性
		public string ClaID
		{
			get
			{
				return this.claID;
			}
			set
			{
				this.claID = value;
			}
		}
		//缺勤日期 读/写属性
		public string AfdDate
		{
			get
			{
				return this.afdDate;
			}
			set
			{
				this.afdDate = value;
			}
		}
		//缺勤类型 读/写属性
		public int Type
		{
			get
			{
				return this.type;
			}
			set
			{
				this.type = value;
			}
		}
		//缺勤课时 读/写属性
		public int Hours
		{
			get
			{
				return this.hours;
			}
			set
			{
				this.hours = value;
			}
		}
		//备注 读/写属性
		public string Remark
		{
			get
			{
				return this.remark;
			}
			set
			{
				this.remark = value;
			}
		}
		#endregion 
	}
}

⌨️ 快捷键说明

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