def insert(): Quy_Danh = request.form['Quy_Danh'] Ten_Khach_Hang = request.form['Ten_Khach_Hang'] Dia_Chi = request.form['Dia_Chi'] CMND = request.form['CMND'] Email = request.form['Email'] SDT = request.form['SDT'] Ghi_Chu = request.form['Ghi_Chu'] if request.method == 'POST': msg = Message("Email xác nhận", sender="*****@*****.**", recipients=[Email]) msg.html = render_template('email.html', Quy_Danh=Quy_Danh, Ten_Khach_Hang=Ten_Khach_Hang, Dia_Chi=Dia_Chi, CMND=CMND, Email=Email, SDT=SDT, Ghi_Chu=Ghi_Chu) mail.send(msg) return render_template("customer_information.html", info=dao.add_Khachhang( Quy_Danh=Quy_Danh, Ten_Khach_Hang=Ten_Khach_Hang, Dia_Chi=Dia_Chi, CMND=CMND, Email=Email, SDT=SDT, Ghi_Chu=Ghi_Chu))
def opendialog_callback(self): msg=( 'This is a message box of type %s, widh icon %s' % (self.p2.get(), self.p1.get() )) # Note : the dialog is modal, and returs the pressed button dlg=Message( title='MessageBox',message=msg, parent=self, icon=self.p1.get(), type=self.p2.get() ) selection = dlg.show() Message( parent=self, icon='info', type='ok', title='Your Choice', message='You pressed '+selection ).show()
def opendialog_callback(self): msg = ('This is a message box of type %s, widh icon %s' % (self.p2.get(), self.p1.get())) # Note : the dialog is modal, and returs the pressed button dlg = Message(title='MessageBox', message=msg, parent=self, icon=self.p1.get(), type=self.p2.get()) selection = dlg.show() Message(parent=self, icon='info', type='ok', title='Your Choice', message='You pressed ' + selection).show()
def about(self, *e): ABOUT = ("NLTK Concordance Search Demo\n") TITLE = 'About: NLTK Concordance Search Demo' try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE, parent=self.main_frame).show() except: ShowText(self.top, TITLE, ABOUT)
def about(self, *e): ABOUT = ("NLTK Shift-Reduce Parser Demo\n" + "Written by Edward Loper") TITLE = 'About: Shift-Reduce Parser Demo' try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE).show() except: ShowText(self._top, TITLE, ABOUT)
def generate_report(self): date_start = self.date_start.get('0.0', END).strip() date_end = self.date_end.get('0.0', END).strip() try: Generator.ReportGenerator(date_start, date_end, 'Bill_Report').generate_reports() except Exception as ex: Message().show( title='Error', message= "Maybe can't connection to server, please try again later.") raise ex print('Finish') Message().show( title='Success', message="Reports generated successfully into 'Report' directory.")
def about(self, *e): ABOUT = ("NLTK Recursive Descent Parser Application\n" + "Written by Edward Loper") TITLE = 'About: Recursive Descent Parser Application' try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE).show() except: ShowText(self._top, TITLE, ABOUT)
def about(self, *e): ABOUT = "NLTK Shift-Reduce Parser Application\n" + "Written by Edward Loper" TITLE = "About: Shift-Reduce Parser Application" try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE).show() except: ShowText(self._top, TITLE, ABOUT)
def about(self, *e): ABOUT = ( "NLTK Discourse Representation Theory (DRT) Glue Semantics Demo\n" + "Written by Daniel H. Garrette") TITLE = "About: NLTK DRT Glue Demo" try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE).show() except: ShowText(self._top, TITLE, ABOUT)
def about(self, *e): """ Dispaly an 'about' dialog window for the NLTK plot tool. """ ABOUT = ("NLTK Plot Tool\n" "<http://nltk.sourceforge.net>") TITLE = 'About: Plot Tool' if isinstance(self._plot, BLTPlotFrame): ABOUT += '\n\nBased on the BLT Widget' try: from tkinter.messagebox import Message Message(message=ABOUT, title=TITLE).show() except: ShowText(self._root, TITLE, ABOUT)
q = PhieuDatCho( Khach_Hang_id=p.id, Ma_Chuyen_Bay_id = session["id"], Gia_Tien=session["Gia_Ve_Loai_1"], Thoi_Gian_Dat_ve=datetime.now(), ) db.session.add(q) db.session.commit() Ma_Chuyen_Bay_id = q.id if request.method == 'POST': msg = Message("Mail Xác Nhận Đơn Hàng", sender="*****@*****.**", recipients=[Email]) msg.html = render_template('email.html',Ma_Chuyen_Bay_id=Ma_Chuyen_Bay_id, Quy_Danh=Quy_Danh, Ten_Khach_Hang=Ten_Khach_Hang, Dia_Chi=Dia_Chi, CMND=CMND, Email=Email, SDT=SDT, Ghi_Chu=Ghi_Chu, San_Bay_Di=San_Bay_Di, San_Bay_Den=San_Bay_Den, Ngay_Bay=Ngay_Bay, Thoi_Gian_Bay=Thoi_Gian_Bay, Ngay_Ha_Canh=Ngay_Ha_Canh, Thoi_Gian_Ha=Thoi_Gian_Ha, Gia_Ve_Loai_1=Gia_Ve_Loai_1) mail.send(msg) return render_template("customer_information.html") ======= if request.method == 'POST': msg = Message("Email xác nhận", sender="*****@*****.**", recipients=[Email])
def show_message(self, message): window = Toplevel(master=self) window.title("Help") label = Message(master=window, text=message) label.pack(fill="x", padx=10, pady=10)