public void FirmToString() { var firm = new Vacancies(); string expected = "BusinessLogicLayer.Vacancies"; var str = firm.ToString(); Assert.AreEqual(expected, str); }
public bool printManagerInfo(Vacancies emp, employee[] empArr) { double average = 0; int count = 0; foreach (var item in empArr) { if (item.position == emp.ToString()) { average += item.salary; count++; } } average /= count; if (this.salary > average) { return(true); } else { return(false); } }
public void Report1(Vacancies vac) { double summSal = 0; int ClerkCount = 0; foreach (Employees item in emp) { if (item.Position == Vacancies.Clerk) { summSal += item.Salary; ClerkCount++; } } summSal = summSal / ClerkCount; List <Employees> list = new List <Employees>(); foreach (Employees item in emp) { if (item.Position == vac && item.Salary > summSal) { list.Add(item); } } Console.WriteLine("{0}, зарплата которых больше средней зарплаты {1} всех ({2}) клерков", vac.ToString(), summSal, ClerkCount); list = list.OrderBy(o => o.FullName).ToList(); PrintInfo(list); }