2010 年以前に雇用されたグリッドの従業員を表示しようとしています。どうすればそれを行うことができますか? Employee
プロパティ (FirstName、LastName、Id、および EmploymentDate)を持つクラスがあります。
private List<Employee> _employees = new List<Employee>();
private void Form1_Load(object sender, EventArgs e)
{
Employee employee1 = new Employee();
employee1.FirstName = "Etrit";
employee1.LastName = "Bujupi";
employee1.Id = 1;
employee1.EmploymentDay = DateTime.Today;
_employees.Add(employee1);
Employee employee2 = new Employee();
employee2.FirstName = "Urim";
employee2.LastName = "Sadiu";
employee2.Id = 2;
employee2.EmploymentDay = new DateTime(2009, 1, 23);
_employees.Add(employee2);
Employee employee3 = new Employee();
employee3.FirstName = "Dardan";
employee3.LastName = "Mexhuani";
employee3.Id = 3;
employee3.EmploymentDay = new DateTime(2007, 2, 7);
_employees.Add(employee3);
Employee add = new Employee();
if (_employees < System.DateTime.Now)
{
EmployeeGrid.DataSource = _employees;
}
}