How to create data base for 1 to 8 th stndar studet and each standard have 4 months students mark

import mysql.connector
from tkinter import *
from tkinter import messagebox
from tkinter import ttk

def May_show():

conn=mysql.connector.connect(host='localhost',user='root',passwd='root',database="May")
mycur=conn.cursor()
mycur.execute("select * from pro1t")
result=mycur.fetchall()
for res in result:
    treev.insert("",'end',values=(res[0],res[1],res[2],res[3]))
cursor.execute(sql)
db.close()

def June_show():

conn=mysql.connector.connect(host='localhost',user='root',passwd='root',database="June")
mycur=conn.cursor()
mycur.execute("select * from pro1t")
result=mycur.fetchall()
for res in result:
    treev.insert("",'end',values=(res[0],res[1],res[2],res[3]))
cursor.execute(sql)
db.close()

def July_show():

conn=mysql.connector.connect(host='localhost',user='root',passwd='root',database="July")
mycur=conn.cursor()
mycur.execute("select * from pro1t")
result=mycur.fetchall()
for res in result:
    treev.insert("",'end',values=(res[0],res[1],res[2],res[3]))
cursor.execute(sql)
db.close()

def Aug_show():

conn=mysql.connector.connect(host='localhost',user='root',passwd='root',database="Aug")
mycur=conn.cursor()
mycur.execute("select * from pro1t")
result=mycur.fetchall()
for res in result:
    treev.insert("",'end',values=(res[0],res[1],res[2],res[3]))
cursor.execute(sql)
db.close()

def openwindow():

label1=Label(win,text="Branch",bg='white',bd=5,width=20,fg='black',font=('times new roman',12,'bold'))  #department
label1.place(x=650,y=220)
menubar = Menu(win)
may = Menu(menubar, tearoff=0)
menubar.add_cascade(label="May", menu=may)
may.add_command(May_show)

june = Menu(menubar, tearoff=0)
menubar.add_cascade(label="Jun", menu=jun)
june.add_command(June_show)

july = Menu(menubar, tearoff=0)
menubar.add_cascade(label="July", menu=july)
july.add_command(July_show)

aug = Menu(menubar, tearoff=0)
aug.add_cascade(label="Augest", menu=aug)
aug.add_command(aug_show)

sep = Menu(menubar, tearoff=0)
menubar.add_cascade(label="September", menu=sep)
sep.add_command(June_show)
#sep.add_command(print("hello"))
helpmenu = Menu(menubar, tearoff=0)
# helpmenu.add_command(label="Help Index")
# helpmenu.add_command(label="About...")
menubar.add_cascade(label="Help")
win.config(menu=menubar)

openwindow.config(menu=menubar)

Label(text='Students Records', font=('times new roman',18,'bold'), bg='white', fg='Black').place(y=10,x=460, relwidth=0.4, relheight=0.08, relx=0)

.place(relx=0.45, rely=0.05)

tree = ttk.Treeview(height=90, selectmode=BROWSE,
               columns=("Name", "MQC", "SAQ", "LAQ"))
X_scroller = Scrollbar(tree, orient=HORIZONTAL, command=tree.xview)
Y_scroller = Scrollbar(tree, orient=VERTICAL, command=tree.yview)
X_scroller.pack(side=BOTTOM, fill=X)
Y_scroller.pack(side=RIGHT, fill=Y)
tree.config(yscrollcommand=Y_scroller.set, xscrollcommand=X_scroller.set)
# tree.heading('Student ID', text='ID', anchor=CENTER)
tree.heading('Name', text='Name', anchor=CENTER)
tree.heading('MQC', text='MQC', anchor=CENTER)
tree.heading('SAQ', text='SAQ', anchor=CENTER)
tree.heading('LAQ', text='LAQ', anchor=CENTER)
# tree.heading('Stream', text='Stream', anchor=CENTER)
tree.column('#0', width=0, stretch=NO)
tree.column('#1', width=280, stretch=NO)
tree.column('#2', width=90, stretch=NO)
tree.column('#3', width=90, stretch=NO)
tree.column('#4', width=80, stretch=NO)
tree.place(y=70,x=460, relwidth=0.4, relheight=0.8, relx=0)

new_window=Toplevel(win)
new_window.title("STUDENT MANAGEMENT SYSTEM")
new_window.minsize(width=800,height=600)
new_window.configure(bg='skyblue')

shown=Button(win,text='NEXT',width=25,command=openwindow)  #command parameter for function
nxtbtn.place(x=650,y=500)

win=Tk()

nxtbtn=Button(win,text=‘NEXT’,width=25,command=openwindow) #command parameter for function
nxtbtn.place(x=650,y=500)
com1=ttk.Combobox(win,width=28)
com1[‘state’]=‘readonly’
com1[‘values’]=(‘January’,‘February’,’ March’,‘April’)
com1.current() #… firt should be empty
com1.place(x=650,y=255)

label1=Label(win,text=“Branch”,bg=‘white’,bd=5,width=20,fg=‘black’,font=(‘times new roman’,12,‘bold’)) #department
label1.place(x=650,y=220)

label2=Label(win,text=“Class”,bg=‘white’,bd=5,width=20,fg=‘black’,font=(‘times new roman’,12,‘bold’)) #department
label2.place(x=650,y=320)

nstd=StringVar()
com2=ttk.Combobox(win,textvariable=nstd,width=28)
com2[‘state’]=‘readonly’
com2[‘values’]=(‘5’,‘6’,‘7’,‘8’,‘9’,‘10’,‘11’,‘12’)
com2.current() #… firt should be empty
com2.place(x=650,y=355)

win.title(“STUDENT MANAGEMENT SYSTEM”)
win.minsize(width=800,height=600)
win.configure(bg=‘skyblue’)
win.mainloop()

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.