Skip to content

Commit

Permalink
STUDENT UPDATE SECTION LABEL COMPLETED AND MSG OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
amalprasad0 committed Jun 1, 2022
1 parent dcc55d3 commit 6f3b78d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 28 deletions.
1 change: 0 additions & 1 deletion Data Records/Student.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
2022-05-27|9:01pm|LIBIN SABU|4DM19IS027|9947789622|OUT|HOSTEL
2022-05-27|10:00PM|PRAJWAL|4DM19IS043|1234567890|OUT|MOODBIDRI
2022-05-27|10:01PM|PRAJWAL|4DM19IS045|1234567890|OUT|MOODBIDRI
2022-05-28|5:00|AKSHAY KUMAR|4DM19IS006|1234567890|OUT|MANGLORE
16 changes: 6 additions & 10 deletions Data Records/Vehicle.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
2022-05-24|19:01:47|KL14A1000|OUT|SABU TV|896756551|BIKE|OUTSIDE
2022-05-24|19:01:47|KL14A7000|OUT|LIBIN SABU |896756551|BIKE|OUTSIDE
2022-05-26|19:15:07:PM|ERTYUIO|OUT|SUNNY |994763821|TRUCK|HOME
2022-05-26|19:15:07:PM|TN68K8900|OUT|SUNNY |994763821|TRUCK|HOME
2022-05-22|20:54:11|KL79G7900|OUT|AMAL PRASAD|7306557354|BIKE|MOODBIDRI
2022-05-30|14:35:24:PM|GA12H7890|IN|ADHITHYAN|9947789622|CAR|HOME
2022-05-31|22:10:40:PM|KL89H8900|OUT|ASEEL HK|1234567890|CAR|HOME
2022-05-31|22:12:26:PM|KL78Y789|IN|MELBIN B|34567890123|BIKE|TOUR
2022-06-01|00:04:35:AM|KL68H6789|OUT|AMAL PRASAD|7306557354|OUT|HOME
2022-06-01|00:06:03:AM|1234567|DFGHJ|AMAL|7306557354|ING|ZXVCBNM
2022-06-01|00:08:35:AM|KL67S67890|OUT|LIBIN SABU|8304939772|CAR|TO VISIT HOSTEL
2022-06-01|00:08:35:AM|KL67S67890|OUT|LIBIN SABU|80780775784|CAR|TO VISIT HOSTEL
2022-06-01|00:08:35:AM|KL67S67890|OUT|LIBIN SABU|7306557354|CAR|TO VISIT HOSTEL
2022-06-01|00:08:35:AM|KL67S67890|OUT|LIBIN SABU|80780775784|CAR|TO VISIT HOSTEL
2022-06-01|00:12:29:AM|TN56Y78900|OUT|PRAJWAL|7306557354|BIKE|HOME
2022-06-01|00:22:56:AM|ZXCVBNM,./|OUT|ASDFGHJKL;|7306557354|CVBNM,| BNM,
2022-06-01|00:22:56:AM|ZXCVBNM,./|OUT|ASDFGHJKL;|7306557354|CVBNM,| BNM,
2022-06-01|21:04:54 PM|KL17U6799|OUT|PRASAD KP|9947789622|CAR|HOME
2022-06-01|21:05:07 PM|KL17U6799|OUT|PRASAD KP|9947789622|CAR|HOME
2022-06-01|21:07:08 PM|KL78ID007|IN|SABU VV|45678901234|TRUCK|HOME
49 changes: 32 additions & 17 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@




from time import strftime
from email.mime import image
from operator import index
from pathlib import Path
Expand Down Expand Up @@ -57,12 +57,13 @@ def relative_to_assets(path: str) -> Path:
# time->


now = datetime.now()
time = now.strftime("%H:%M:%S:%p")
# vlTime.set(time)string = strftime('%H:%M:%S %p')
# vlTime.config(text = string)
# vlTime.after(1000, time)
vlTime.set(time)

def time():
string = strftime('%H:%M:%S %p')


vlTime.set(string)
vdate.after(1000, time)
# method for Insertion of vhl rcd
def insertData():
time=vlTime.get()
Expand Down Expand Up @@ -90,15 +91,15 @@ def insertData():
VhlReader=open("Data Records/Vehicle.txt","a")
VhlReader.write(str(date)+"|"+time+"|"+vehiclenum+"|"+Vinout+"|"+Vowner+"|"+Vlmob+"|"+vltyp+"|"+vreason+"\n")
messagebox.showinfo("STATUS", "RECORD ADDED TO DATABASE")
client = Client('AC4fb3f859d841739f658840ac79a3e879', '6bbdad1b6761f73b391dae6b4c69f87f')
message = client.messages \
.create(
body="Hi "+Vowner+" \nWelcome to Yenepoya Institute of Technology"+" \nYour entering Time :"+str(time)+"\nDate:"+str(date)+"\nVehicle Number:"+vehiclenum+"\nLiqiud-Loop Gate Security System",
from_='+19403505053',
to="+91"+Vlmob
)
# client = Client('AC4fb3f859d841739f658840ac79a3e879', '6bbdad1b6761f73b391dae6b4c69f87f')
# message = client.messages \
# .create(
# body="Hi "+Vowner+"Welcome to Yenepoya Institute of Technology"+" \nYour entering Time :"+str(time)+"\nDate:"+str(date)+"\nVehicle Number:"+vehiclenum+"\nLiqiud-Loop Gate Security System",
# from_='+19403505053',
# to="+91"+Vlmob
# )

print(message.sid)
# print(message.sid)



Expand Down Expand Up @@ -252,6 +253,7 @@ def update():
filereader2=open("Data Records/Vehicle.txt","w+")
for i in lines:
filereader2.write(i)
messagebox.showinfo("Sucess", "Successfully updated")
u_name=up_name.set("")
u_num=up_num.set("")
u_mob=up_mob.set("")
Expand Down Expand Up @@ -1093,7 +1095,7 @@ def student_update():
sup_usn=StringVar()
sup_mob=StringVar()
search_date.set("2022-05-27")
search_usn.set("4dm19is027")
search_usn.set("4dm19is045")
def SearchTree():
Student_date=search_date.get()
print(Student_date)
Expand Down Expand Up @@ -1198,13 +1200,19 @@ def update():
filereader2=open("Data Records/Student.txt","w+")
for i in lines:
filereader2.write(i)
messagebox.showinfo("Status", "Record Updated")
sup_name.set("")
sup_usn.set("")
sup_mob.set("")
filereader2.close()
# -----------------Endend------------




# date of Student
vdate = Label(Supdate_section,text = "Date:",bg="#FFFFFF").place(x = 20,y = 70)

student_date = Entry(Supdate_section,
bd=0,
bg="#C4C4C4",
Expand All @@ -1219,6 +1227,8 @@ def update():
)

# vhl number
vhlnum = Label(Supdate_section,text = "USN:",bg="#FFFFFF").place(x = 250,y = 70)

student_usn = Entry(Supdate_section,
bd=0,
bg="#C4C4C4",
Expand Down Expand Up @@ -1246,6 +1256,8 @@ def update():
height=50.0
)
# vhl owner name
u_name = Label(Supdate_section,text = "Name:",bg="#FFFFFF").place(x = 20,y = 455)

update_nameS = Entry(Supdate_section,
bd=0,
bg="#C4C4C4",
Expand All @@ -1259,6 +1271,8 @@ def update():
height=48.0
)
# Vehicle number
vhlnum = Label(Supdate_section,text = "USN:",bg="#FFFFFF").place(x = 247,y = 455)

student_usn2 = Entry(Supdate_section,
bd=0,
bg="#C4C4C4",
Expand All @@ -1271,6 +1285,7 @@ def update():
width=182.0,
height=48.0
)
mob= Label(Supdate_section,text = "Mobile:",bg="#FFFFFF").place(x = 473,y = 455)
student_mob= Entry(Supdate_section,
bd=0,
bg="#C4C4C4",
Expand Down Expand Up @@ -1401,7 +1416,7 @@ def update():
statusbar.pack(side=BOTTOM, fill=X)
# ended------------>
window.resizable(False,False)

time()
# ------STUDENT SEARCH SECTION-------->
photo = PhotoImage(file ="assets/barrier.png")
window.iconphoto(False,photo)
Expand Down
29 changes: 29 additions & 0 deletions sample_p.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from tkinter import *

from time import strftime

root=Tk()
root.geometry("400x400")

u_num=StringVar()
def time():
string = strftime('%H:%M:%S %p')
# vhlnum.config(text = string)
u_num.set(string)
vhlnum.after(1000, time)

vhlnum = Entry(root,
bd=0,
bg="#C4C4C4",
highlightthickness=0,
textvariable=u_num

)
vhlnum.place(
x=250.0,
y=100.0,
width=182.0,
height=48.0
)
time()
root.mainloop()

0 comments on commit 6f3b78d

Please sign in to comment.