コード例 #1
0
 def getHouseholdAssets(self,projectid,selectedHNumbers):
         ''' get lists of household members for selected households'''
         
         householdAssets = []
         connector = HouseholdBudget()
         householdAssets = connector.getHouseholdMembership(projectid,selectedHNumbers)
         return householdAssets
コード例 #2
0
 def getReportData(self):
         ''' get households that meet the combined criteria of household and personal characteristics'''
         
         projectid = self.getProjectID()
         if self.cmbHouseholds.currentText() =='All Households':
                 allhid = []
                 row = 0
                 while (self.listViewHNumbers.model().item(row,0)):
                     val = self.listViewHNumbers.model().item(row,0).text()
                     allhid.append(str(val))
                     row = row + 1
                 selectedHNumbers = allhid
         else:
                 selectedHNumbers = self.getSelectedHouseholdNumbers()
                 
         connector = HouseholdBudget()
         householdMembership  = connector.getHouseholdMembership(projectid,selectedHNumbers)
         householdAssets     = connector.getAssets(projectid,selectedHNumbers)
         householdFoodIncome = connector.getFoodIncome(projectid,selectedHNumbers)
         householdCashIncome = connector.getCashIncome(projectid,selectedHNumbers)
         householdBudgetSummary = connector.householdBudgetSummaries(projectid,selectedHNumbers)
         
         return (selectedHNumbers,householdMembership,householdAssets,householdCashIncome,householdFoodIncome,householdBudgetSummary)