def update_manufacturer(id):
    name = request.form['name']
    location = request.form['location']
    product_type = request.form['product_type']
    manufacturer = Manufacturer(name, location, product_type, id)
    manufacturer_repository.update(manufacturer)
    return redirect('/manufacturers')
Ejemplo n.º 2
0
def update_manufacturer(id):
    name = request.form['name']
    phone = request.form['phone']
    website = request.form['website']
    email = request.form['email']
    manufacturer = Manufacturer(name, phone, website, email, id)
    manufacturer_repository.update(manufacturer)
    return redirect('/manufacturers')
Ejemplo n.º 3
0
def update_manufacturer(id):
    name = request.form["name"]
    address = request.form["address"]
    deactivated = request.form["deactivated"]

    manufacturer = Manufacturer(name, address, deactivated, id)
    manufacturer_repository.update(manufacturer)
    return redirect("/manufacturers")
Ejemplo n.º 4
0
def update_manufacturer(id):
    name = request.form["name"]
    description = request.form["description"]
    category = request.form["category"]
    active = request.form["active"]
    # pdb.set_trace()
    new_manufacturer = Manufacturer(name, description, category, active)
    if request.form["active"] == False:
        new_manufacturer.make_inactive()
    new_manufacturer.id = id
    manufacturer_repository.update(new_manufacturer)
    return redirect("/manufacturers")
Ejemplo n.º 5
0
def update_manufacturer(id):
    name = request.form['name']
    contact = request.form['contact']
    manufacturer = Manufacturer(name, contact, id)
    manufacturer_repository.update(manufacturer)
    return redirect('/manufacturers')
def update_manufacturer(id):
    name = request.form["name"]
    country = request.form["country"]
    new_manufacturer = Manufacturer(name, country, id)
    manufacturer_repository.update(new_manufacturer)
    return redirect("/manufacturers")