Created
March 25, 2014 20:54
-
-
Save joeygreen/9771108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
divRollup.InnerHtml = "<strong>Using Employee.Manager(s)</strong><br /><br />"; | |
if (emp.Manager != null) | |
{ | |
divRollup.InnerHtml += "1 - " + emp.Manager.EmployeeFullName + "<br />"; | |
if (emp.Manager.Superior != null) | |
{ | |
divRollup.InnerHtml += "2 - " + emp.Manager.Superior.FullName + "<br />"; | |
if (emp.Manager.Superior.Superior != null) | |
{ | |
divRollup.InnerHtml += "3 - " + emp.Manager.Superior.Superior.FullName + "<br />"; | |
if (emp.Manager.Superior.Superior.Superior != null) | |
{ | |
divRollup.InnerHtml += "4 - " + emp.Manager.Superior.Superior.Superior.FullName + "<br />"; | |
if (emp.Manager.Superior.Superior.Superior.Superior != null) | |
{ | |
divRollup.InnerHtml += "5 - " + emp.Manager.Superior.Superior.Superior.Superior.FullName + "<br />"; | |
if (emp.Manager.Superior.Superior.Superior.Superior.Superior != null) | |
{ | |
divRollup.InnerHtml += "6 - " + emp.Manager.Superior.Superior.Superior.Superior.Superior.FullName + "<br />"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is by far my favorite chunk of code I've found in the workplace codebase so far.