-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_gui_cafee_pg.py
77 lines (41 loc) · 1.7 KB
/
main_gui_cafee_pg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#cafe MG System:-
from tkinter import*
from tkinter import messagebox
import subprocess
charges = ""
def order_window():
global charges
customer_name = name.get().capitalize()
if len(customer_name) != 0:
if dailon.get() == 1 and new.get() == 1:
messagebox.showerror("warn","don't click both checkbox")
elif dailon.get() == 1:
window.destroy()
charges = "Yes"
subprocess.Popen(["Python","caffe_order_&_payment.py",customer_name,charges])
elif new.get() == 1:
window.destroy()
charges = "No"
subprocess.Popen(["Python","caffe_order_&_payment.py",customer_name,charges])
else:
messagebox.showerror("Error","please any checkbox\nfor further uses")
else:
messagebox.showerror("Empty-name","Please Enter Name\nEx:- pushkar")
window = Tk()
window.title("café System")
window.geometry("350x260")
dailon = IntVar()
new = IntVar()
title = Label(window,text="My café",font=("Times New Roman ",22,"bold underline"))
title.place(x=120,y=10)
label_name = Label(window,text="Name:",font="bold")
label_name.place(x=60,y=70)
name = Entry(window)
name.place(x=120,y=73)
c1 = Checkbutton(window,text="dailon",font=15,variable=dailon)
c1.place(x=80,y=120)
c2 = Checkbutton(window,text="New Customer",font=15,variable=new)
c2.place(x=180,y=120)
go = Button(window,text="Go",font=("bold",15),borderwidth=14,fg="red",command=order_window)
go.place(x=140,y=180)
window.mainloop()