Example #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')
Example #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')
Example #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')
Example #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')
Example #5
0
def deleteModel():
    code = request.args.get('code')
    PlaneModel.DeletePlaneModel(code)
    return redirect('/planeModel')
Example #6
0
def editModel():
    code = request.form.get('code')
    seatQuantity = request.form.get('seatQuantity')
    Model = PlaneModel.SelectPlaneModelsID(code)
    Model.UpdatePlaneModel(seatQuantity)
    return redirect('/planeModel')
Example #7
0
def insertModel():
    seatQuantity = request.form.get('seatQuantity')
    Model = PlaneModel("NULL", seatQuantity)
    Model.InsertPlaneModel()
    return redirect("/planeModel")
Example #8
0
def planeModel():
    modelLista = PlaneModel.SelectPlaneModels()
    return render_template('PlaneModel.html', modelLista=modelLista)
 def GetSeat(dic):
     Model = PlaneModel.SelectPlaneModelsID(dic["modelCode"])
     return dic["seatNumber"], Model, dic["seatClass"]
 def GetPlane(dic):
     Model = PlaneModel.SelectPlaneModelsID(dic["modelCode"])
     return dic["idPlane"], Model, dic["constructionDay"]