Пример #1
0
def populateFootwearDesignDetails():

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

	dao = FootwearDesignDAO(gc_connector)

	entries = [
				("HAUGHNEY-70", "Haughney", ".", 69.99),
				("GRADUATE PNL SPM BLK CANVAS", "LACOSTE", ".", 99.99),
				("UA MICRO G ELEVATE", "UNDER ARMOUR", ".", 49.99),
				("FRIDOLPH-27", "FRIDOLPH", ".", 59.99),
				("JACOU-70", "JACOU", ".", 59.00),
				("AGREWIEL-36", "AGREWIEL", ".", 59.99),
				("GRAD VULC TSP US SPM WHT", "LACOSTE", ".", 74.99),
				("GRADUATE PTE SPM DK GRY LTH", "LACOSTE", ".", 99.99),
				("135154", "DEXTER COMFORT", ".", 39.99),
				("25725", "ASHER", ".", 69.99),
				("RW GALA BLK", "ROBERT WAYNE", ".", 120.00),
				("NIKE SB CHECK NB", "NIKE", ".", 90.00)
	          ]


	for entry in entries:
		dao.createAnEntry(entry)

	print(dao.selectAllEntries())

	print("===================================================")
	print("Testing populateFootwearDesignDetails-------------------complete\n\n\n")
Пример #2
0
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)

		cost += 1

	print(dao.selectAllEntries())

	print("===================================================")
	print("Testing populateFootwearDesignDetails-------------------complete\n\n\n")
Пример #3
0
	def getFirstPageInfo(self):

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

		footwearSelectionDAO = FootwearSelectionDAO(connector)

		selections = footwearSelectionDAO.selectDistinct("Selection")

		queryResult = list()
		for selection in selections:

			footwearDesigns = list()

			for entry in footwearSelectionDAO.selectEntries("Selection", selection):
				footwearDesigns.append(entry[1])

			for footwearDesign in footwearDesigns:
				footwearDesignDAO = FootwearDesignDAO(connector)
				entry = footwearDesignDAO.selectAnEntry(footwearDesign)

				queryResult.append((selection, entry[1], entry[2], entry[3], entry[4]))

		return queryResult