-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdashboard_3.py
161 lines (93 loc) · 3.77 KB
/
dashboard_3.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
from tkinter import *
from tkinter import messagebox
import pymysql
#import signup as a
#def con():
def back():
import dashboard
dashbord_window.destroy()
# def abc():
# try:
# con=pymysql.connect(host='localhost',user='root',password='satyam@4545')
# mycursor=con.cursor()
# print(con)
# except:
# messagebox.showerror('Error','connection failed')
# return
# try:
# query='use userdata'
# mycursor.execute(query)
# query='create table adres(id int auto_increment primary key not null, name varchar(100), appartment varchar(50),)'
# mycursor.execute(query)
# except:
# query='use userdata'
# mycursor.execute(query)
# query='insert into adres(name , address ) values(%s,%s)'
# mycursor.execute(query,('satyam','satyam'
# 'satyam','satyam'))
# messagebox.showinfo('successful','appartment is registered')
# con.commit()
# con.close()
def front():
import dashboard_App_A_4
dashbord_window.destroy()
def add():
import addappartme
# try:
# query='use userdata'
# mycursor.execute(query)
# query='create tabel addapartment(id int auto_increment primary key not null,name varchar(50), address varchar(100), )'
# except:
dashbord_window = Tk()
dashbord_window.title("dashboard")
dashbord_window.geometry('990x660+50+50')
heading=Label(dashbord_window,text='Welcome ',font=('Microsoft Yahei UI Light',35,'bold'))
heading.place(x=400,y=50)
#frame = Tk.Frame(dashbord_window)
# #frame.pack()
# text_disp=Button(dashbord_window, text="FLOORS" )
# text_disp.place(relx=0.1,rely=0.1)
# #text_disp.pack(side=tk.LEFT)
# view_button =Button(dashbord_window, text="VIEW")
# view_button.place(relx=0.1,rely=0.2)
selectApp=Label(dashbord_window,text='-> Select Appartment:',font=('Microsoft Yahei UI Light',18,'bold'))
selectAPPButton=Button(dashbord_window,text='Appartment A',font=('Microsoft Yahei UI Light',18,'bold'),command=front)
selectAPPButton.place(x=100,y=250)
selectApp.place(x=60,y=170)
selectApp2=Button(dashbord_window,text='Apartmenr B',font=('Microsoft Yahei UI Light',18,'bold'))
selectApp2.place(x=450,y=250)
addButton=Button(dashbord_window,text='Add apartment',font=('Microsoft Yahei UI Light',18,'bold'),command=add)
addButton.place(x=750,y=250)
# dashbord_window.mainloop()
searchLabel=Label(dashbord_window,text='-> Search tenant',font=('Microsoft Yahei UI Light',18,'bold'))
searchLabel.place(x=60,y=390)
gobackButton=Button(dashbord_window,text='go back',font=('Microsoft Yahei UI Light',18,'bold'),command=back)
gobackButton.place(x=100,y=50)
dashbord_window.mainloop()
# from tkinter import Tk, Frame, Menu
# class Example(Frame):
# def __init__(self):
# super().__init__()
# self.initUI()
# def initUI(self):
# self.master.title("Submenu")
# menubar = Menu(self.master)
# self.master.config(menu=menubar)
# fileMenu = Menu(menubar)
# submenu = Menu(fileMenu)
# submenu.add_command(label="New feed",command=self)
# submenu.add_command(label="Bookmarks")
# submenu.add_command(label="Mail")
# fileMenu.add_cascade(label='Import', menu=submenu, underline=0)
# fileMenu.add_separator()
# fileMenu.add_command(label="Exit", underline=0, command=self.onExit)
# menubar.add_cascade(label="File", underline=0, menu=fileMenu)
# def onExit(self):
# self.quit()
# def main():
# root = Tk()
# root.geometry("250x150+300+300")
# app = Example()
# root.mainloop()
# if __name__ == '__main__':
# main()