Student.cs
上传用户:xy99169
上传日期:2022-08-03
资源大小:139k
文件大小:1k
- 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;
- /// <summary>
- /// Student 的摘要说明
- /// </summary>
- public class Student
- {
-
- private string _studentID;
- private string _studentName;
- private string _classIn;
- private string _phone;
-
- public Student()
- {
- //
- // TODO: 在此处添加构造函数逻辑
- //
- }
- public Student(string id, string name, string classIn, string phone)
- {
- _studentID = id;
- _studentName = name;
- _classIn = classIn;
- _phone = phone;
- }
- public string StudentID
- {
- get { return _studentID; }
- set { _studentID = value; }
- }
- public string StudentName
- {
- get { return _studentName; }
- set { _studentName = value; }
- }
- public string ClassIn
- {
- get { return _classIn; }
- set { _classIn = value; }
- }
- public string Phone
- {
- get { return _phone;}
- set { _phone = value; }
- }
- public bool IsValid
- {
- get
- {
- if (StudentID.Length > 0 && StudentName.Length > 0)
- return true;
- else
- return false;
- }
- }
- public override string ToString()
- {
- return StudentID + " " + StudentName;
- }
- }