예제 #1
0
 def addFile(self):
     fileName = self.getCsvFileName()
     if fileName:
         parser = CSVParser()
         newTransactionMap = parser.parseCsv(fileName)
         self.transactionMap = parser.addTransactionMap(
             self.transactionMap, newTransactionMap)
         allMonths = list(self.transactionMap.keys())
         allMonths.sort()
         self.monthsList = allMonths
         self.loadMonth(self.currentMonth)
예제 #2
0
 def loadNewFile(self):
     fileName = self.getCsvFileName()
     if fileName:
         parser = CSVParser()
         self.transactionMap = parser.parseCsv(fileName)
         allMonths = list(self.transactionMap.keys())
         allMonths.sort()
         self.monthsList = allMonths
         self.loadMonth(allMonths[-1])
         if len(allMonths) > 1:
             self.monthDecreaseButton.show()
         self.addMetricsButton()