Beispiel #1
0
def insert(option: int) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regsynd, regcomp = validcompany(option)
        if int(regcomp.codeComp) > 0:
            regcomp.nameComp = inform_name('Company')
            Company.insertdb(regcomp)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N]? ')
Beispiel #2
0
def update(option: int) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regcard: Card = validcard(option)
        if int(regcard.codeCard) > 0:
            regcard.nameCard = inform_name('Card')
            Card.updatedb(regcard)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N}? ')
Beispiel #3
0
def insert(option: int) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regsynd: Syndicate = validsyndicate(option)
        if int(regsynd.codeSynd) > 0:
            regsynd.nameSynd = inform_name('Syndicate')
            Syndicate.insertdb(regsynd)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N]? ')
Beispiel #4
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]? ')
Beispiel #5
0
def update(option: int) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regsynd: Syndicate = validsyndicate(option)
        # the code informed is ok
        if int(regsynd.codeSynd) > 0:
            regsynd.nameSynd = inform_name('Syndicate')
            Syndicate.updatedb(regsynd)

        resp = ' '
        while resp.upper() not in 'YN':
            resp = input('Do you want continue [Y/N}? ')
Beispiel #6
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]? ')
Beispiel #7
0
def update(option: int, dfcard: DataFrame) -> None:
    resp = 'Y'
    while resp.upper() == 'Y':
        regcard: Card = validcard(option, dfcard)
        if int(regcard.codeCard) > 0:
            regcard.nameCard = inform_name('Card')

            nameAnt = dfcard.Name
            dfcard['Name'].replace(to_replace=[nameAnt],
                                   value=regcard.nameCard,
                                   inplace=True)

            Card.updatedb(regcard)

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