示例#1
0
    def returnDevice(self, lender, doer):
        lendlog = LendLog()
        lendlog.setDevice(self.__device.device_id)
        lendlog.setLender(lender)
        lendlog.setDoer(doer)
        lendlog.returnDevice(self.__device.lend_log_id)

        self.__device.lend_log_id = None
        db.session.add(self.__device)
        db.session.commit()
示例#2
0
文件: devices.py 项目: Coderhypo/TDMS
    def returnDevice(self, lender, doer):
        lendlog = LendLog()
        lendlog.setDevice(self.__device.device_id)
        lendlog.setLender(lender)
        lendlog.setDoer(doer)
        lendlog.returnDevice(self.__device.lend_log_id)

        self.__device.lend_log_id = None
        db.session.add(self.__device)
        db.session.commit()
示例#3
0
文件: devices.py 项目: Coderhypo/TDMS
 def lendDevice(self, lender, doer):
     lendlog = LendLog()
     lendlog.setDevice(self.__device.device_id)
     lendlog.setLender(lender)
     lendlog.setDoer(doer)
     lendlog.lendDevice()
示例#4
0
 def lendDevice(self, lender, doer):
     lendlog = LendLog()
     lendlog.setDevice(self.__device.device_id)
     lendlog.setLender(lender)
     lendlog.setDoer(doer)
     lendlog.lendDevice()