forked from Chripro/APro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hinzufuegen.py
71 lines (70 loc) · 2.6 KB
/
hinzufuegen.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
from tkinter import *
class Hinzufuegen(Button):
def hinzufuegen(self):
class MyButton(Button):
def aktion1 (self):
f = open('sortiment.txt','a')
inhalt = eingabe1.get()
f.write(inhalt+"\n")
inhalt = eingabe2.get()
f.write(inhalt+"\n")
inhalt = eingabe3.get()
f.write(inhalt+"\n")
inhalt = eingabe4.get()
f.write(inhalt+"\n")
inhalt = eingabe5.get()
f.write(inhalt+"\n")
inhalt = eingabe6.get()
f.write(inhalt+ "\n")
inhalt = eingabe7.get()
f.write(inhalt+ "\n")
inhalt = eingabe8.get()
f.write(inhalt+ "\n")
f.write("\n")
f.close()
fenster.destroy()
fenster = Tk()
fenster.geometry("550x600")
fenster.title("Mitarbeiter anlegen")
rahmen = Frame(fenster, relief="ridge", borderwidth=5)
rahmen.pack(fill="both", expand = 1)
labelHaupt = Label(rahmen, text = "Geben Sie die Daten des "+
"neuen Mitarbeiters ein:")
labelHaupt.config(font=("Arial", 14, "bold"))
labelHaupt.place(x = 50, y = 10)
label1 = Label(rahmen, text = "Name:")
label1.place(x = 100, y = 100)
eingabe1 = Entry(rahmen, bd = 2, width = 22)
eingabe1.place(x = 200, y = 100)
label2 = Label(rahmen, text = "Radmontage A:")
label2.place(x = 100, y = 140)
eingabe2 = Entry(rahmen, bd = 2, width = 22)
eingabe2.place(x = 200, y = 140)
label3 = Label(rahmen, text = "Radmontage B:")
label3.place(x = 100, y = 180)
eingabe3 = Entry(rahmen, bd = 2, width = 22)
eingabe3.place(x = 200, y = 180)
label4 = Label(rahmen, text = "Antriebsmontage:")
label4.place(x = 100, y = 220)
eingabe4 = Entry(rahmen, bd = 2, width = 22)
eingabe4.place(x = 200, y = 220)
label5 = Label(rahmen, text = "Elektroinstallation:")
label5.place(x = 100, y = 260)
eingabe5 = Entry(rahmen, bd = 2, width = 22)
eingabe5.place(x = 200, y = 260)
label6 = Label(rahmen, text="Verkabelung:")
label6.place(x=100, y=300)
eingabe6 = Entry(rahmen, bd=2, width=22)
eingabe6.place(x=200, y=300)
label7 = Label(rahmen, text="Karosseriemontage:")
label7.place(x=100, y=340)
eingabe7 = Entry(rahmen, bd=2, width=22)
eingabe7.place(x=200, y=340)
label8 = Label(rahmen, text="Qualitätskontrolle:")
label8.place(x=100, y=380)
eingabe8 = Entry(rahmen, bd=2, width=22)
eingabe8.place(x=200, y=380)
button = MyButton(rahmen,text="Eingabe")
button["command"] = button.aktion1
button.place(x = 180, y = 420)
fenster.mainloop()