📄 studentexam.cs
字号:
using System;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using DataAccess;
using Forms;
namespace BusinessRule
{
/// <summary>
/// StudentExam 的摘要说明。
/// 1. 创建一个新的学员考试信息实例时,用默认构造方法
/// 2. 实例化一个已经存在的实例时,传入学员编号和考试编号作为参数
/// </summary>
public class StudentExam //学生平时考试信息类
{
private int stuID; //学生编号
private string claID; //班级编号
private int examID; //考试编号
private float Score; //考试成绩
private string Remark; //备注
public StudentExam()
{
//默认构造方法
}
public StudentExam(int stuID,int examID)
{
this.stuID = stuID;
this.examID = examID;
//获得班级平时考试信息表
SqlDataReader myRd = jimmy.GetStuExamInfoByStuIDExamID(stuID,examID);
myRd.Read();
this.claID = myRd["claID"].ToString();
this.Score = float.Parse(myRd["Score"].ToString());
this.Remark = myRd["Remark"].ToString();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -