add clear input
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -160,3 +160,4 @@ cython_debug/
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
*.db
|
||||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.autopep8"
|
||||
},
|
||||
"python.formatting.provider": "none"
|
||||
}
|
||||
22
main.py
22
main.py
@@ -71,7 +71,6 @@ def options():
|
||||
|
||||
window.mainloop()
|
||||
|
||||
|
||||
def validateLogin(username, password):
|
||||
sess = Session()
|
||||
users = sess.query(Users).filter(Users.login==username, Users.passwd==password)
|
||||
@@ -135,7 +134,6 @@ def addUserGui():
|
||||
|
||||
window.mainloop()
|
||||
|
||||
|
||||
def addPrinterGui():
|
||||
|
||||
window = Tk()
|
||||
@@ -177,7 +175,6 @@ def addPrinterGui():
|
||||
nazvaniee.delete(0, END)
|
||||
window.mainloop()
|
||||
|
||||
|
||||
def addPlasticGui():
|
||||
window = Tk()
|
||||
window.geometry("380x350")
|
||||
@@ -256,8 +253,6 @@ def addPlasticGui():
|
||||
|
||||
window.mainloop
|
||||
|
||||
|
||||
|
||||
def addDolgnostGui():
|
||||
window = Tk()
|
||||
window.geometry("300x120")
|
||||
@@ -278,12 +273,10 @@ def addDolgnostGui():
|
||||
sess.add(new)
|
||||
sess.commit()
|
||||
sess.close()
|
||||
dolg.delete(0, END)
|
||||
|
||||
window.mainloop()
|
||||
|
||||
|
||||
|
||||
|
||||
def addPrintSettingsGui():
|
||||
window = Tk()
|
||||
window.geometry("800x600")
|
||||
@@ -382,6 +375,8 @@ def addPrintSettingsGui():
|
||||
sess.add(new)
|
||||
sess.commit()
|
||||
sess.close()
|
||||
|
||||
#minSpedPrint.delete(0, END)
|
||||
|
||||
|
||||
|
||||
@@ -423,8 +418,6 @@ def addPrintSettingsGui():
|
||||
|
||||
window.mainloop()
|
||||
|
||||
|
||||
|
||||
def getPrintSettings():
|
||||
sess = Session()
|
||||
|
||||
@@ -484,8 +477,6 @@ def getUsers():
|
||||
print(user.fio)
|
||||
print(dolg.dolgnst)
|
||||
|
||||
|
||||
|
||||
def getDolgnost():
|
||||
sess = Session()
|
||||
dlggs = sess.query(Dolgnost).all()
|
||||
@@ -499,7 +490,6 @@ def getDolgnost():
|
||||
sess.close()
|
||||
return dlg_list
|
||||
|
||||
|
||||
def getPinters():
|
||||
sess = Session()
|
||||
printers = sess.query(Printer).all()
|
||||
@@ -522,9 +512,5 @@ def getPlastics():
|
||||
|
||||
return plst
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
getUsers()
|
||||
addDolgnostGui()
|
||||
52
ts.py
Normal file
52
ts.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from tkinter import *
|
||||
from tkinter import ttk
|
||||
|
||||
|
||||
ws = Tk()
|
||||
ws.title('PythonGuides')
|
||||
ws.geometry('500x500')
|
||||
ws['bg'] = '#AC99F2'
|
||||
|
||||
game_frame = Frame(ws)
|
||||
game_frame.pack()
|
||||
|
||||
my_game = ttk.Treeview(game_frame)
|
||||
|
||||
my_game['columns'] = {'player_id':'1',
|
||||
'player_name': '2',
|
||||
'player_Rank':'3',
|
||||
'player_states':'4',
|
||||
'player_city':'5'}
|
||||
|
||||
|
||||
|
||||
for key, value in my_game['columns'].items():
|
||||
print(key)
|
||||
my_game.column(key,anchor=CENTER, width=80)
|
||||
|
||||
|
||||
""""
|
||||
my_game.heading("#0",text="",anchor=CENTER)
|
||||
my_game.heading("player_id",text="Id",anchor=CENTER)
|
||||
my_game.heading("player_name",text="Name",anchor=CENTER)
|
||||
my_game.heading("player_Rank",text="Rank",anchor=CENTER)
|
||||
my_game.heading("player_states",text="States",anchor=CENTER)
|
||||
my_game.heading("player_city",text="States",anchor=CENTER)
|
||||
|
||||
my_game.insert(parent='',index='end',iid=0,text='',
|
||||
values=('1','Ninja','101','Oklahoma', 'Moore'))
|
||||
my_game.insert(parent='',index='end',iid=1,text='',
|
||||
values=('2','Ranger','102','Wisconsin', 'Green Bay'))
|
||||
my_game.insert(parent='',index='end',iid=2,text='',
|
||||
values=('3','Deamon','103', 'California', 'Placentia'))
|
||||
my_game.insert(parent='',index='end',iid=3,text='',
|
||||
values=('4','Dragon','104','New York' , 'White Plains'))
|
||||
my_game.insert(parent='',index='end',iid=4,text='',
|
||||
values=('5','CrissCross','105','California', 'San Diego'))
|
||||
my_game.insert(parent='',index='end',iid=5,text='',
|
||||
values=('6','ZaqueriBlack','106','Wisconsin' , 'TONY'))
|
||||
|
||||
my_game.pack()
|
||||
"""
|
||||
|
||||
ws.mainloop()
|
||||
Reference in New Issue
Block a user