Пример #1
0
def in_state(call):
    with AdoptBranch() as bd:
        sign = True
        if not bd.execute(AdoptBranch.in_state(call)):
            sign = False
        print("SSS")
        return sign
Пример #2
0
def in_country(call):
    with AdoptBranch() as bd:
        sign = True
        if not bd.execute(AdoptBranch.in_country(call)):
            sign = False

        return sign
Пример #3
0
def update_status_product(file_name, sign):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.update_status_product(file_name, sign))
Пример #4
0
def our_choice(city):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.our_choice(city))

        return bd.fetchall()
Пример #5
0
def city(state):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_city(state))
        return bd.fetchall()
Пример #6
0
def add_user(user_id):
    with AdoptBranch() as cur:
        cur.execute(AdoptBranch.add_user(user_id))
Пример #7
0
def add_pay(token, user_id, file_name, data_req, status):
    with AdoptBranch() as bd:
        bd.execute(
            AdoptBranch.add_pay(token, user_id, file_name, data_req, status))
Пример #8
0
def in_city(call):
    with AdoptBranch() as bd:
        if not bd.execute(AdoptBranch.in_city(call)):
            return 0
        else:
            return 1
Пример #9
0
def select_user_state(user_id):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_user_state(user_id))
        return bd.fetchone()[0]
Пример #10
0
def delete_payment(data_req, token):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.delete_payment(data_req, token))
Пример #11
0
def change_user_state(user_id, state):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.update_user_state(user_id, state))
Пример #12
0
def get_all():
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_all())
        return bd.fetchall()
Пример #13
0
def get_zip(zip_code):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_zip(zip_code))
        return bd.fetchall()
Пример #14
0
def cmp_token(token):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.cmp_token(token))
        return bd.fetchall()
Пример #15
0
def get_login_pass(filename):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_login_pass(filename))
        return bd.fetchall()
Пример #16
0
def exist(call):
    with AdoptBranch() as bd:
        if len(bd.exist(call)) == 0:
            return False
        else:
            return True
Пример #17
0
def get_token(user_id):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_token(user_id))
        return bd.fetchall()
Пример #18
0
def country():
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_country())
        return bd.fetchall()
Пример #19
0
def autorisation(user_id):
    with AdoptBranch() as bd:
        if not bd.execute(AdoptBranch.select_user(user_id)):
            return 0
        return 1
Пример #20
0
def state(country):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_state(country))
        print("ASD)")
        return bd.fetchall()
Пример #21
0
def add_payment(call):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.in_zip(call))
Пример #22
0
def get_filename(val):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_filename(val))
        return bd.fetchone()[0]