Beispiel #1
0
def userDeleteTicket(username, card, departure, destination, date, BusId):
    BT = BusTable()
    PT = PurchaseTable()
    DT = DeleteTable()
    condition = {
        'username': username,
        'card': card,
        'departure': departure,
        'destination': destination,
        'date': date,
        'BusId': BusId
    }
    p = PT.searchRecord(condition)
    i = p[0]
    PT.deleteOneRecord(username, card, departure, destination, date, BusId)
    DT.insertRecord(username, card, departure, destination, date, BusId,
                    i['price'])
    BT.addOneSeat(departure, destination, date, BusId)
Beispiel #2
0
def userDeleteTicket(username, card, departure, destination, date, BusId):
    BT = BusTable()
    PT = PurchaseTable()
    DT = DeleteTable()
    # <<<<<<< HEAD
    PT.deleteOneRecord(username, card, departure, destination, date, BusId)
    DT.insertRecord(username, card, departure, destination, date, BusId, 4396)
    # =======
    condition = {
        'username': username,
        'card': card,
        'departure': departure,
        'destination': destination,
        'date': date,
        'BusId': BusId
    }
    p = PT.searchRecord(condition)
    i = p[0]
    PT.deleteOneRecord(username, card, departure, destination, date, BusId)
    DT.insertRecord(username, card, departure, destination, date, BusId,
                    i['price'])
    # >>>>>>> 1dfb90fd307e946b179efd04504ebd442b8c498d
    BT.addOneSeat(departure, destination, date, BusId)