Households

New Household
<% Flash().ShowSuccessIfPresent %> <% Flash().ShowErrorsIfPresent %>
<%= HouseholdController.recordCount %> household(s) <% If HouseholdController.searchTerm <> "" Or HouseholdController.filterTerritoryId > 0 Or HouseholdController.filterDoNotCall > -1 Then %> Clear <% End If %>
<% Dim iter, h Set iter = HouseholdController.households.Iterator() If Not iter.HasNext() Then %> <% Else Do While iter.HasNext() Set h = iter.GetNext() %> <% Loop End If %>
ID Address Type DNC Street Territory Actions
<% If HouseholdController.searchTerm <> "" Then %> No households found matching "<%= Server.HTMLEncode(HouseholdController.searchTerm) %>" <% ElseIf HouseholdController.filterTerritoryId > 0 Then %> No households found in this territory. <% Else %> No households found. Create one <% End If %>
<%= h.Id %> <%= Server.HTMLEncode(h.Address) %> <% If h.IsBusiness = 1 Then %> Business <% Else %> Residential <% End If %> <% If h.DoNotCall = 1 Then %> Do Not Call <% If IsDate(h.DoNotCallDate) Then %>
<%= FormatDateTime(h.DoNotCallDate, 2) %>
<% End If %> <% Else %> No <% End If %>
<%= h.StreetNumber %> <%= Server.HTMLEncode(h.StreetName) %> <% If HouseholdController.territoryNamesById.Exists(CStr(h.TerritoryId)) Then Response.Write Server.HTMLEncode(HouseholdController.territoryNamesById(CStr(h.TerritoryId))) Else Response.Write "Territory " & h.TerritoryId End If %> View Edit
<% If HouseholdController.pageCount > 1 Then %> <% Dim baseUrl, pg, startPage, endPage baseUrl = "/households?" If HouseholdController.searchTerm <> "" Then baseUrl = baseUrl & "q=" & Server.URLEncode(HouseholdController.searchTerm) & "&" End If If HouseholdController.filterTerritoryId > 0 Then baseUrl = baseUrl & "territory=" & HouseholdController.filterTerritoryId & "&" End If If HouseholdController.filterDoNotCall > -1 Then baseUrl = baseUrl & "dnc=" & HouseholdController.filterDoNotCall & "&" End If ' Calculate pagination range (show 5 pages at a time) startPage = HouseholdController.currentPage - 2 If startPage < 1 Then startPage = 1 endPage = startPage + 4 If endPage > HouseholdController.pageCount Then endPage = HouseholdController.pageCount startPage = endPage - 4 If startPage < 1 Then startPage = 1 End If %>

Page <%= HouseholdController.currentPage %> of <%= HouseholdController.pageCount %>

<% End If %>