-
Notifications
You must be signed in to change notification settings - Fork 0
/
Page2.py
142 lines (97 loc) · 4.63 KB
/
Page2.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
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 21 15:02:55 2019
@author: Manav
"""
import sqlite3
import tkinter as tk
from tkinter import messagebox
def set_data(name,dob,qualification,cgpa,email,password):
try:
conn = sqlite3.connect('jobs.db')
conn.execute("INSERT INTO COMPANY(name,dob,qualification,cgpa,email,password,flag)\
VALUES (?,?,?,?,?,?,?)",(name,dob,qualification,cgpa,email,password,0));
conn.commit()
except sqlite3.IntegrityError:
messagebox.showinfo("Error","Failed")
else:
messagebox.showinfo("Success","Entered Successfully!")
root.destroy()
HEIGHT = 500
WIDTH = 600
root = tk.Tk()
canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH)
canvas.pack()
background_image = tk.PhotoImage(file='Page1.png')
background_label = tk.Label(root, image=background_image)
background_label.place(relwidth=1, relheight=1)
#-------Title----------
frameT = tk.Frame(root, bg='white', bd=5)
frameT.place(relx=0.5, rely=0.075, relwidth=0.75, relheight=0.1, anchor='n')
label = tk.Label(frameT, text="Sign Up Fast!!!", font=("Times","-25"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
#-------Name----------
frameN = tk.Frame(root, bg='white', bd=5)
frameN.place(relx=0.15, rely=0.25, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameN, text="Name : ", font=("Times","-25"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
frameNT = tk.Frame(root, bg='white', bd=5)
frameNT.place(relx=0.3, rely=0.25, relwidth=0.6, relheight=0.075)
name = tk.Entry(frameNT, font=80)
#Name.insert(0,'Bill Gates')
name.place(relwidth=1, relheight=1)
#-------DOB----------
frameD = tk.Frame(root, bg='white', bd=5)
frameD.place(relx=0.15, rely=0.35, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameD, text="D.O.B : ", font=("Times","-25"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
frameDT = tk.Frame(root, bg='white', bd=5)
frameDT.place(relx=0.3, rely=0.35, relwidth=0.6, relheight=0.075)
dob = tk.Entry(frameDT, font=80)
#dob.insert(0,'DD/MM/YYYY')
dob.place(relwidth=1, relheight=1)
#-------Qualification----------
frameQ = tk.Frame(root, bg='white', bd=5)
frameQ.place(relx=0.15, rely=0.45, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameQ, text="Qualification : ", font=("Times","-18"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
frameQT = tk.Frame(root, bg='white', bd=5)
frameQT.place(relx=0.3, rely=0.45, relwidth=0.6, relheight=0.075)
qualification = tk.Entry(frameQT, font=80)
#qualification.insert(0,'E.x, B.E.')
qualification.place(relwidth=1, relheight=1)
#-------CGPA----------
frameC = tk.Frame(root, bg='white', bd=5)
frameC.place(relx=0.15, rely=0.55, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameC, text="C.G.P.A : ", font=("Times","-25"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
frameCT = tk.Frame(root, bg='white', bd=5)
frameCT.place(relx=0.3, rely=0.55, relwidth=0.6, relheight=0.075)
cgpa = tk.Entry(frameCT, font=80)
#cgpa.insert(0,'E.x, 9.14')
cgpa.place(relwidth=1, relheight=1)
#-------Email----------
frameE = tk.Frame(root, bg='white', bd=5)
frameE.place(relx=0.15, rely=0.65, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameE, text="Email : ", font=("Times","-25"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
frameET = tk.Frame(root, bg='white', bd=5)
frameET.place(relx=0.3, rely=0.65, relwidth=0.6, relheight=0.075)
email = tk.Entry(frameET, font=80)
#email.insert(0,'[email protected]')
email.place(relwidth=1, relheight=1)
#-------Password----------
frameP = tk.Frame(root, bg='white', bd=5)
frameP.place(relx=0.15, rely=0.75, relwidth=0.2, relheight=0.075, anchor='n')
label = tk.Label(frameP, text="Password : ", font=("Times","-20"), bg = "#593d25", fg = "White")
label.place(relwidth=1, relheight=1)
framePT = tk.Frame(root, bg='white', bd=5)
framePT.place(relx=0.3, rely=0.75, relwidth=0.6, relheight=0.075)
password = tk.Entry(framePT, font=80,show="*")
password.place(relwidth=1, relheight=1)
#-------Submit----------
frameB = tk.Frame(root, bg='white', bd=5)
frameB.place(relx=0.75, rely=0.85, relwidth=0.3, relheight=0.1, anchor='n')
button = tk.Button(frameB, text="Submit", font=("Times","-25"),bg = "#593d25",fg = "White",activebackground="#b79374",command=lambda: set_data(name.get(),dob.get(),qualification.get(),cgpa.get(),email.get(),password.get()))
button.place(relheight=1, relwidth=1)
root.mainloop()