📄 studentfac.cs
字号:
using System;
using ExamSystem.BusinessRule.TeacherRule;
using ExamSystem.Common.Objects;
using System.Data;
using ExamSystem.Common;
namespace ExamSystem.BusinessFacade.TeacherFac
{
/// <summary>
/// StudentFac 的摘要说明。
/// </summary>
public class StudentFac
{
public StudentFac()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public DataSet getStuByClass(int classID,string className)
{
Class cls=new Class();
cls.ClassID=classID;
cls.ClassName=className.Trim();
StudentRule stuRule=new StudentRule();
DataSet ds=stuRule.getStuByClass(cls);
return ds;
}
public DataSet getStudent(int stuID,int stuNumber,string stuName,int classID,DateTime birday,SearchBooleans sex)
{
Student stu=new Student();
stu.StuID=stuID;
stu.StuNum=stuNumber;
stu.StuName=stuName;
stu.StuClass=classID;
stu.StuBirday=birday;
stu.StuSex=sex;
StudentRule stuRule=new StudentRule();
DataSet ds=stuRule.getStudent(stu);
return ds;
}
public bool insertStudent(int num,string name,int classID,DateTime birday,SearchBooleans sex,byte[] pic,string remark)
{
Student stu=new Student();
stu.StuNum=num;
stu.StuName=name;
stu.StuClass=classID;
stu.StuBirday=birday;
stu.StuSex=sex;
stu.StuPic=pic;
stu.StuRemark=remark;
StudentRule stuRule=new StudentRule();
return stuRule.insertStudent(stu);
}
public bool updateStudent(int stuID,int num,string name,string pass,int classID,DateTime birday,SearchBooleans sex,byte[] pic,string remark)
{
Student stu=new Student();
stu.StuID=stuID;
stu.StuNum=num;
stu.StuName=name;
stu.StuClass=classID;
stu.StuBirday=birday;
stu.StuPass=pass;
stu.StuSex=sex;
stu.StuPic=pic;
stu.StuRemark=remark;
StudentRule stuRule=new StudentRule();
return stuRule.updateStudent(stu);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -