Exemplo n.º 1
0
    def updateMietverhaeltnis(self, data: XMietverhaeltnis) -> None:
        data.geboren_am = datehelper.convertEurToIso(data.geboren_am)
        data.vermietet_ab = datehelper.convertEurToIso(data.vermietet_ab)
        if data.vermietet_bis:
            data.vermietet_bis = datehelper.convertEurToIso(data.vermietet_bis)
        resp = self._session. \
            post(Server.SERVER + 'business.php?q=update_mietverhaeltnis&user=' + self._user,
                 data=data.getValuesAsDict())

        self._getWriteRetValOrRaiseException(resp)
Exemplo n.º 2
0
    def insertMietverhaeltnis(self, data: XMietverhaeltnis) -> int:
        data.geboren_am = datehelper.convertEurToIso(data.geboren_am)
        data.vermietet_ab = datehelper.convertEurToIso(data.vermietet_ab)
        if data.vermietet_bis:
            data.vermietet_bis = datehelper.convertEurToIso(data.vermietet_bis)
        resp = self._session. \
            post(Server.SERVER + 'business.php?q=insert_mietverhaeltnis&user=' + self._user,
                 data=data.getValuesAsDict())

        writeRetVal: WriteRetVal = self._getWriteRetValOrRaiseException(resp)
        return int(writeRetVal.object_id())