Esempio n. 1
0
def deleteProductCategory(id=0, productId=0, categoryId=0):
    result = False
    try:
        tmp = db.procedure("deleteProductCategory", [id, productId, categoryId])
        result = tmp[0]["rows"] > 0
    except: pass
    return result
Esempio n. 2
0
def update(category):
    result = False
    try:
        tmp = db.procedure("updateCategory", category.toArray())
        result = tmp[0]["rows"] > 0
    except: pass
    return result
Esempio n. 3
0
def delete(categoryId):
    result = False
    try:
        tmp = db.procedure("deleteCategory", [categoryId])
        result = tmp[0]["rows"] > 0
    except: pass
    return result
Esempio n. 4
0
def addProductCategory(productId, categoryId):
    result = False
    try:
        tmp = db.procedure("addProductCategory", [productId, categoryId])
        result = tmp[0]["rows"]
    except: pass
    return result
Esempio n. 5
0
def add(name, description):
    result = False
    try:
        tmp = db.procedure("addCategory", [name, description])
        result = tmp[0]["rows"]
    except: pass
    return result
Esempio n. 6
0
def delete(charactId):
    result = False
    try:
        tmp = db.procedure("deleteCharacteristic", [charactId])
        result = tmp[0]["rows"] > 0
    except:
        pass
    return result
Esempio n. 7
0
def update(characterictics):
    result = False
    try:
        tmp = db.procedure("updateCharacteristic", characterictics.toArray())
        result = tmp[0]["rows"] > 0
    except:
        pass
    return result
Esempio n. 8
0
def add(name, content):
    result = False
    try:
        tmp = db.procedure("addCharacteristic", [name, content])
        result = tmp[0]["rows"]
    except:
        pass
    return result
Esempio n. 9
0
def addCharacteristicProduct(productId, charactId):
    result = False
    try:
        tmp = db.procedure("addCharacteristicProduct", [charactId, productId])
        result = tmp[0]["rows"]
    except:
        pass
    return result
Esempio n. 10
0
def deleteProductCharacteristic(id=0, productId=0, charactId=0):
    result = False
    try:
        tmp = db.procedure("deleteProductCharacteristic",
                           [id, productId, charactId])
        result = tmp[0]["rows"] > 0
    except:
        pass
    return result