面向对象转化为实际的代码——请大家指点
/// <summary>
/// 员工类
/// </summary>
public class Sataffer
{
public IList <Sataffer> staffers;
public IList <Sataffer> Staffers
{
get { return staffers; }
set { staffers = value; }
}
/// <summary>
/// 获取员工列表
/// </summary>
/// <returns> </returns>
public IList <Sataffer> GetStafferList()
{
IList <Sataffer> staffers = new List <Sataffer> ();
staffers.Add(new Sataffer());
return staffers;
}
public void Add()
{
//添加一个员工到数据库中的代码
}
}
/// <summary>
/// 部门类
/// </summary>
public class Department
{
public IList <Sataffer> staffers;
public IList <Sataffer> Staffers
{
get { return staffers; }
set { staffers = value; }
}
/// <summary>
/// 获取员工列表
/// </summary>
/// <returns> </returns>
public IList <Sataffer> GetStafferList()