?? employee.cs
字號:
using System;
using System.Collections.Generic;
using System.Text;
namespace Project1
{
/// <summary>
/// This Employee class inherites the common properties
/// from the User Interface, and defines its own properties
/// as well.
/// </summary>
public class Employee : User
{
private String gender;
private String name;
private String password;
private String userID;
private String empID;
private DateTime doj;
private String email;
private String job;
/// <summary>
/// Constructor of the Employee class
/// </summary>
/// <param name="userID">User ID of the employee</param>
/// <param name="password">Password of the employee</param>
/// <param name="empID">Employee ID of the employee</param>
/// <param name="name">Name of the employee</param>
/// <param name="gender">Gender of the employee</param>
/// <param name="doj">Joining date of the employee</param>
/// <param name="email">Email of the employee</param>
/// <param name="job">Job of the employee</param>
public Employee(String userID, String password, String empID,
String name, String gender, DateTime doj,
String email, String job)
{
this.userID = userID;
this.password = password;
this.empID = empID;
this.name = name;
this.gender = gender;
this.doj = doj;
this.email = email;
this.job = job;
}
/// <summary>
/// Default constructor of the Employee class
/// </summary>
public Employee()
{
userID = "";
password = "";
empID = "";
name = "";
gender = "";
doj = new DateTime(0);
email = "";
job = "";
}
#region User Members
/// <summary>
/// Set and get the property of user ID
/// </summary>
public string sUserID
{
get
{
return userID;
}
set
{
userID = value;
}
}
/// <summary>
/// Set and get the property of user's password
/// </summary>
public string sPassword
{
get
{
return password;
}
set
{
password = value;
}
}
/// <summary>
/// Set and get the property of user's name
/// </summary>
public string sName
{
get
{
return name;
}
set
{
name = value;
}
}
/// <summary>
/// Set and get the property of user's gender
/// </summary>
public string sGender
{
get
{
return gender;
}
set
{
gender = value;
}
}
#endregion
/// <summary>
/// Set and get the property of employee ID
/// </summary>
public String sEmpID
{
get
{
return empID;
}
set
{
empID = value;
}
}
/// <summary>
/// Set and get the property of employee's joining date
/// </summary>
public DateTime dDOJ
{
get
{
return doj;
}
set
{
doj = value;
}
}
/// <summary>
/// Set and get the property of user's email
/// </summary>
public String sEmail
{
get
{
return email;
}
set
{
email = value;
}
}
/// <summary>
/// Set and get the property of user's job
/// </summary>
public String sJob
{
get
{
return job;
}
set
{
job = value;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -