Esempio n. 1
0
def main():

    dbConnect = DbConnect(BaseDAO.getDbDir())
    connector = dbConnect.getConnection()

    baseDAO = BaseDAO(connector, g_tableName, g_columnHeaders)

    # testCreateAnEntry(baseDAO)
    testGetPriKeys(baseDAO)
    testSelectAnEntry(baseDAO)
    testSelectAllEntries(baseDAO)
    testSelectAColumn(baseDAO)
    testSelectMax(baseDAO)
    testSelectDistinct(baseDAO)
    testDelete(baseDAO)
    testUpdate(baseDAO)
import sys

from Service.DbConnect import DbConnect

from DAO.BaseDAO import BaseDAO
from DAO.BarcodeDAO import BarcodeDAO
from DAO.CustomerDAO import CustomerDAO
from DAO.FootwearDesignDAO import FootwearDesignDAO
from DAO.FootwearSelectionDAO import FootwearSelectionDAO
from DAO.InventoryDAO import InventoryDAO
from DAO.VirtualCartDAO import VirtualCartDAO

from Tables.TableStructs import *

gc_dbConnect = DbConnect(BaseDAO.getDbDir())
gc_connector = gc_dbConnect.getConnection()

def populateFootwearDesignDetails():

	print(sys._getframe().f_code.co_name + ": ")

	dao = FootwearDesignDAO(gc_connector)

	productName 	= "Shoe"
	brandName   	= "Brand"
	description		= "Description"
	cost			= 1.00

	for i in range(1, 5+1):
		entry = (productName+str(i), brandName+str(i), description+str(i), cost)
		dao.createAnEntry(entry)