public override string ToString()
{
if (PlanStaff != null)
{
try
{
//берем первого руководителя из списка неуволенных
FactStaff factStaff = PlanStaff.FactStaffs.Where(fctStaff => fctStaff.Prikaz == null).First() as FactStaff;
if (factStaff != null)
return this.DepartmentSmallName + " (" + factStaff.ToString() + ")";
}
catch (InvalidOperationException)
{
return this.DepartmentSmallName;
}
}
return this.DepartmentSmallName;
}