예제 #1
0
    def _dispatchSaveAction(self, actionstring: str, x: XSonstAus):
        try:
            idx = constants.actionList.index(actionstring)
        except:
            self._view.showException(
                "Internal Error",
                "SonstAusController._dispatchSaveAction(): unknown action '%s'"
                % (actionstring))
            sys.exit()

        if idx == constants.tableAction.INSERT:
            try:
                BusinessLogic.inst().insertSonstigeAuszahlung(x)
            except Exception as e:
                self._view.showException(
                    "SonstAusController._dispatchSaveAction()",
                    "call BusinessLogic.inst().insertSonstigeAuszahlung(x)",
                    str(e))
                sys.exit()
        elif idx == constants.tableAction.UPDATE:
            try:
                BusinessLogic.inst().updateSonstigeAuszahlung(x)
            except Exception as e:
                self._view.showException(
                    "SonstAusController._dispatchSaveAction()",
                    "call BusinessLogic.inst().updateSonstigeAuszahlung(x)",
                    str(e))
                sys.exit()
        elif idx == constants.tableAction.DELETE:
            try:
                BusinessLogic.inst().deleteSonstigeAuszahlung(x)
            except Exception as e:
                self._view.showException(
                    "SonstAusController._dispatchSaveAction()",
                    "call BusinessLogic.inst().deleteSonstigeAuszahlung(x)",
                    str(e))
                sys.exit()
        else:
            self._view.showException(
                "SonstAusController._dispatchSaveAction(): known but unhandled action '%s'"
                % (actionstring))
            sys.exit()
예제 #2
0
 def _updateSollZahlung( self, xlist: List[XSollzahlung] ):
     BusinessLogic.inst().updateSollHausgelder( xlist )
예제 #3
0
 def _insertSollZahlung( self, xlist:List[XSollzahlung] ):
     BusinessLogic.inst().insertSollHausgelder( xlist )
예제 #4
0
 def _createTableModel( self ) -> SollzahlungenTableModel:
     sollHG = BusinessLogic.inst().getSollHausgelder()
     tm = SollHgvTableModel( sollHG )
     return tm
예제 #5
0
 def getAllVerwalter():
     vwlist = BusinessLogic.inst().getAlleVerwalter()
     vw = self._chooseDebiKrediFromList( vwlist )
     edidlg.getEditor().setDebiKredi( vw )
예제 #6
0
 def _deleteAbrechnung(self, x: XAbrechnung):
     BusinessLogic.inst().deleteHgAbrechnung(x)
예제 #7
0
 def _insertAbrechnung(self, x: XAbrechnung):
     BusinessLogic.inst().insertHgAbrechnung(x)
예제 #8
0
 def _createModel(self, jahr: int) -> AbrechnungenTableModel:
     return BusinessLogic.inst().getHgAbrechnungenTableModel(jahr)
예제 #9
0
 def getAlleMieter():
     mieterlist = BusinessLogic.inst().getAlleMieter()
     mieter = self._chooseBezugFromList( mieterlist )
     edidlg.getEditor().setBezug( mieter )
예제 #10
0
 def getAlleVerwalter():
     vwlist = BusinessLogic.inst().getAlleVerwalter()
     vw = self._chooseBezugFromList( vwlist )
     edidlg.getEditor().setBezug( vw )
예제 #11
0
 def getAlleFirmen():
     firmenlist = BusinessLogic.inst().getAlleKreditoren()
     firma = self._chooseBezugFromList( firmenlist )
     edidlg.getEditor().setBezug( firma )
예제 #12
0
 def writeChanges(self, changes: Dict[int, Dict]) -> bool:
     # todo: in try...except einbetten
     BusinessLogic.inst().updateHausgeldvorauszahlungen(changes)
     return True
예제 #13
0
 def updateSollwerte(self, rowlist: List[Dict], jahr: int,
                     monat: int) -> None:
     return BusinessLogic.inst().provideSollHGV(rowlist, jahr, monat)
예제 #14
0
 def getRowList(self, jahr: int, monat: int) -> List[Dict]:
     return BusinessLogic.inst().getHausgeldVorauszahlungenMitSollUndSummen(
         jahr, monat)
예제 #15
0
 def _setLetzteBuchung( self ):
     d = self._mainwin.getLetzteBuchung()
     try:
         BusinessLogic.inst().setLetzteBuchung( d["datum"], d["text"] )
     except Exception as ex:
         self._mainwin.showException( str( ex ), "MainController.onShutdown()" )
예제 #16
0
 def _onBetrachtungsjahrChanged(self, jahr: int):
     self._model = BusinessLogic.inst().getRenditeTableModel(jahr)
     self._view.setTableModel(jahr)
     self._model.setSortable(True)
     self._jahr = jahr
예제 #17
0
 def getKuendigungsdatum(self, mv_id: str) -> (int, int, int) or None:
     return BusinessLogic.inst().getKuendigungsdatum2(mv_id)
예제 #18
0
 def _createTableModel( self ) -> SollzahlungenTableModel:
     # alle aktiven und zukünftigen Sollmieten holen
     smlist = BusinessLogic.inst().getSollmieten()
     tm = SollmietenTableModel( smlist )
     return tm
예제 #19
0
 def _getExistingAbrechnungsjahre(self) -> List[int]:
     return BusinessLogic.inst().getExistingHgAbrechnungsjahre()
예제 #20
0
 def _insertSollZahlung( self, xlist:List[XSollzahlung] ):
     BusinessLogic.inst().insertSollmieten( xlist )
예제 #21
0
 def _updateAbrechnung(self, x: XAbrechnung):
     BusinessLogic.inst().updateHgAbrechnung(x)
예제 #22
0
 def _updateSollZahlung( self, xlist: List[XSollzahlung] ):
     BusinessLogic.inst().updateSollmieten( xlist )
예제 #23
0
 def __init__(self):
     ## ACHTUNG: in definitions.py zuerst ROOT auf ändern,
     # sonst werden die Änderungen in der Test-Datenbank eingetragen.
     # !!!!!!!!!!!!!!!UND DANN WIEDER ZURÜCK ÄNDERN!!!!!!!!!!!!!
     return ## AUSKOMMENTIEREN
     self._busi = BusinessLogic.inst()
예제 #24
0
 def getAllFirmen():
     firmenlist = BusinessLogic.inst().getAlleKreditoren()
     firma = self._chooseDebiKrediFromList( firmenlist )
     edidlg.getEditor().setDebiKredi( firma )