private static void AddEmployeeSubItems(ListViewItem destination, Employee source) { destination.SubItems.Add(source.LastName); destination.SubItems.Add($"{source.DateOfBirth:d}"); destination.SubItems.Add(source.Oib); destination.SubItems.Add(source.Position.ToString()); destination.SubItems.Add(RelationProjectEmployeeRepo.EmployeeThisWeeksWorkHours(source.Oib).ToString()); }
private static void SetEmployeeBackColor(ListViewItem destination, Employee hoursSource) { if (RelationProjectEmployeeRepo.EmployeeThisWeeksWorkHours(hoursSource.Oib) > 40) { destination.BackColor = Color.Red; } else if (RelationProjectEmployeeRepo.EmployeeThisWeeksWorkHours(hoursSource.Oib) < 30) { destination.BackColor = Color.Goldenrod; } else { destination.BackColor = Color.MediumSeaGreen; } }