private HtmlTableRow CreateOfficeHeading(OfficeClass officeClass, string stateCode, string countyCode = "", string localCode = "") { var contestName = Offices.GetLocalizedOfficeClassDescription(officeClass, stateCode, countyCode, localCode) + " Offices"; Control officeHeading; if (!_DataManager.IsOfficeClassClosed(officeClass)) { officeHeading = CreateOfficePageAnchor(stateCode, countyCode, localCode, officeClass, "Add " + contestName); } else { officeHeading = new Literal { Text = contestName } }; var tr = new HtmlTableRow().AddCssClasses("trReportGroupHeadingLeft"); var td = new HtmlTableCell { ColSpan = 2 }.AddTo(tr, "tdReportGroupHeadingLeft"); officeHeading.AddTo(td); return(tr); }