protected static int CreateOneAnchorCell(ReportUser reportUser, HtmlTable htmlTable, ref HtmlTableRow tr, string name, int cellsDisplayedInRow, string stateCode, string countyCode, string localCode = "") { if (MaxCellsInRow == cellsDisplayedInRow) { tr = new HtmlTableRow().AddTo(htmlTable, "trLinks"); cellsDisplayedInRow = 0; } HtmlAnchor officialsAnchor = null; switch (reportUser) { case ReportUser.Public: officialsAnchor = CreatePublicOfficalsAnchor(name, stateCode, countyCode, localCode); break; case ReportUser.Master: case ReportUser.Admin: officialsAnchor = CreateAdminOfficialsAnchor(name, stateCode, countyCode, localCode); break; } var td = new HtmlTableCell().AddTo(tr, "tdCountyLocalLinks"); officialsAnchor.AddTo(td); cellsDisplayedInRow++; return(cellsDisplayedInRow); }