Пример #1
0
def insert(option: int) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regcard: Card = validcard(option)
        if int(regcard.codeCard) > 0:
            # the code informed is ok
            regcard.nameCard = inform_name('Card')
            Card.insertdb(regcard)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N]? ')
Пример #2
0
def insert(option: int, dfcard: DataFrame) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regcard: Card = validcard(option, dfcard)
        if int(regcard.codeCard) > 0:
            # the code informed is ok
            regcard.nameCard = inform_name('Card')

            dfcard.loc[len(dfcard) + 1] = [regcard.codeCard, regcard.nameCard]
            Card.insertdb(regcard)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N]? ')