Exemple #1
0
 def __init__(self):
     self.conn = sqlite3.connect('moncafe.db')
     self.employees = Employees(self.conn)
     self.activities = Activities(self.conn)
     self.suppliers = Suppliers(self.conn)
     self.products = Products(self.conn)
     self.coffee_stands = Coffee_stands(self.conn)
Exemple #2
0
 def __init__(self):
     self._conn = sqlite3.connect('./moncafe.db')
     self.Employees = Employees(self._conn)
     self.Suppliers = Suppliers(self._conn)
     self.Products = Products(self._conn)
     self.Coffee_stands = Coffee_stands(self._conn)
     self.Activities = Activities(self._conn)
 def connect(self):
     # if os.path.isfile(DB_NAME):
     #     os.remove(DB_NAME)
     self._conn = sqlite3.connect(DB_NAME)
     self.Employees = Employees(self._conn)
     self.Suppliers = Suppliers(self._conn)
     self.Products = Products(self._conn)
     self.Coffee_stands = Coffee_stands(self._conn)
     self.Activities = Activities(self._conn)
def print_Employees(conn):
    print("Employees")
    all_employees = Employees(conn).find_all()
    for employee in all_employees:
        print(employee)