def __init__(self): conn = get_connection() self.admins_DAO = Admins_DAO(conn)
def __init__(self): conn = get_connection() self.condominium_DAO = Condominium_DAO(conn)
def __init__(self): conn = get_connection() self.apartments_DAO = Apartments_DAO(conn)
def __init__(self): conn = get_connection() self.residents_DAO = Residents_DAO(conn)
def get_database(): connection = dao.get_connection() database = connection.mydb return database
def __init__(self): conn = get_connection() self.bills_DAO = Bills_DAO(conn)
def delete(lunchId): param = int(lunchId) dao.getCursor().execute("""DELETE FROM lunch WHERE id = ?""", [param]) dao.get_connection().commit()
def add(time, owner_id, place, description): dao.getCursor().execute( """INSERT INTO lunch (time, owner_id, place, description) VALUES (?, ?, ?, ?)""", (time, int(owner_id), place, description)) dao.get_connection().commit()