【发布时间】:2011-03-03 07:43:49
【问题描述】:
public List<EmployeesX> GetView()
{
Health_Scheme_System.Health_Scheme_SystemDB db = new Health_Scheme_System.Health_Scheme_SystemDB();
var d = from empView in db.EmployeeDirectories
join empTable in db.Employees on empView.ID_NO equals empTable.EmployeeIDCard
join s in db.Schemes on empTable.SchemeID equals s.SchemeID
select new EmployeesX {ID_NO = empView.ID_NO, FIRST_NAME = empView.FIRST_NAME, LAST_NAME = empView.LAST_NAME, EMPLOYMENT_DATE = ((DateTime)empView.EMPLOYMENT_DATE).Date, TERMINATION_DATE = ((DateTime)empView.TERMINATION_DATE).Date, LOCATION_CODE = empView.LOCATION_CODE };
return d.ToList<EmployeesX>();
}
【问题讨论】: