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')
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')
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')
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')
def deleteModel(): code = request.args.get('code') PlaneModel.DeletePlaneModel(code) return redirect('/planeModel')
def editModel(): code = request.form.get('code') seatQuantity = request.form.get('seatQuantity') Model = PlaneModel.SelectPlaneModelsID(code) Model.UpdatePlaneModel(seatQuantity) return redirect('/planeModel')
def insertModel(): seatQuantity = request.form.get('seatQuantity') Model = PlaneModel("NULL", seatQuantity) Model.InsertPlaneModel() return redirect("/planeModel")
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"]