Ejemplo n.º 1
0
def insertSeats():
    modelCode = request.form.get('modelCode')
    seatClass = request.form.get('seatClass')
    model = PlaneModel.SelectPlaneModelsID(modelCode)
    Seat = Seats("NULL", model, seatClass)
    Seat.InsertSeats()
    return redirect('/seats')
Ejemplo n.º 2
0
def insertPlane():
    modelCode = request.form.get('modelCode')
    constructionDay = request.form.get('constructionDay')
    Model = PlaneModel.SelectPlaneModelsID(modelCode)
    plane = Plane("NULL", Model, constructionDay)
    plane.InsertPlane()
    return redirect('/plane')
Ejemplo n.º 3
0
def editPlane():
    idPlane = request.form.get('idPlane')
    modelCode = request.form.get('modelCode')
    constructionDay = request.form.get('constructionDay')
    Model = PlaneModel.SelectPlaneModelsID(modelCode)
    plane = Plane.SelectPlaneID(idPlane)
    plane.UpdatePlane(Model, constructionDay)
    return redirect('/plane')
Ejemplo n.º 4
0
def editSeats():
    seatNumber = request.form.get('seatNumber')
    modelCode = request.form.get('modelCode')
    seatClass = request.form.get('seatClass')
    model = PlaneModel.SelectPlaneModelsID(modelCode)
    Seat = Seats.SelectSeatsID(seatNumber)
    Seat.UpdateSeats(model, seatClass)
    return redirect('/seats')
Ejemplo n.º 5
0
def deleteModel():
    code = request.args.get('code')
    PlaneModel.DeletePlaneModel(code)
    return redirect('/planeModel')
Ejemplo n.º 6
0
def editModel():
    code = request.form.get('code')
    seatQuantity = request.form.get('seatQuantity')
    Model = PlaneModel.SelectPlaneModelsID(code)
    Model.UpdatePlaneModel(seatQuantity)
    return redirect('/planeModel')
Ejemplo n.º 7
0
def insertModel():
    seatQuantity = request.form.get('seatQuantity')
    Model = PlaneModel("NULL", seatQuantity)
    Model.InsertPlaneModel()
    return redirect("/planeModel")
Ejemplo n.º 8
0
def planeModel():
    modelLista = PlaneModel.SelectPlaneModels()
    return render_template('PlaneModel.html', modelLista=modelLista)
Ejemplo n.º 9
0
 def GetSeat(dic):
     Model = PlaneModel.SelectPlaneModelsID(dic["modelCode"])
     return dic["seatNumber"], Model, dic["seatClass"]
Ejemplo n.º 10
0
 def GetPlane(dic):
     Model = PlaneModel.SelectPlaneModelsID(dic["modelCode"])
     return dic["idPlane"], Model, dic["constructionDay"]