def unassignCrsToTch(): c = course(ComboCrsVals[int(ccb.current())][0], ComboCrsVals[int(ccb.current())][1], ComboCrsVals[int(ccb.current())][2]) t = teacher(ComboTchVals[int(tcb.current())][0], ComboTchVals[int(tcb.current())][1], ComboTchVals[int(tcb.current())][2]) t.take_back_crs(c) loadAssignments()
def get_tch_vals(): L = teacher.loadTchCrsId(entr_crsid.get()) LT = [] for i in L: tid = int(i[0]) tfname = i[1] tlname = i[2] t = teacher(tid, tfname, tlname) LT.append(tfname + ' ' + tlname) ComboTchVals.append([tid, tfname, tlname]) return LT
def get_tch_vals(): L = teacher.selectteacher() LT = [] for i in L: tid = int(i[0]) tfname = i[1] tlname = i[2] t = teacher(tid, tfname, tlname) LT.append(tfname + ' ' + tlname) ComboTchVals.append([tid, tfname, tlname]) return LT
def unassignCrsTchToStd(): c = course(ComboCrVals[int(ccb.current())][0], ComboCrVals[int(ccb.current())][1], ComboCrVals[int(ccb.current())][2]) t = teacher(ComboTchVals[int(tcb.current())][0], ComboTchVals[int(tcb.current())][1], ComboTchVals[int(tcb.current())][2]) s = student(ComboStdVals[int(scb.current())][0], ComboStdVals[int(scb.current())][1], ComboStdVals[int(scb.current())][2]) s.remove_crs_tch(c, t) loadAssignments()
def saveTeacher(): c = teacher(int(Te1.get()), Te2.get(), Te3.get()) result = c.insert() if result == 'True': messagebox.showinfo('Alert', 'ثبت اطلاعات استاد با موفقیت انجام شد.') Te1.delete(0, END) Te2.delete(0, END) Te3.delete(0, END) loadTeacher() else: messagebox.showinfo( 'Alert', 'در ثبت اطلاعات استاد خطایی رخ داده است. (' + result + ')')
def get_tch_vals(): global selected_crs_id # print('selected_crs_id::::',selected_crs_id,ComboCrVals[int(ccb.current())][0]) L = teacher.loadTchCrsId( selected_crs_id ) #ComboCrsVals[int(ccb.current())][0]) #selectteacher() LT = [] for i in L: tid = int(i[0]) tfname = i[1] tlname = i[2] t = teacher(tid, tfname, tlname) LT.append(tfname + ' ' + tlname) ComboTchVals.append([tid, tfname, tlname]) return LT
def loadTeacher(): myTlist.delete(0, 'end') L = teacher.selectteacher() L2 = [] for i in L: tid = int(i[0]) tfname = i[1] tlname = i[2] s = teacher(tid, tfname, tlname) L2.append(s) scrollbarT.pack(side=RIGHT, fill=Y) for i in L2: myTlist.insert(END, i.show()) myTlist.pack(side=LEFT, fill=BOTH) scrollbarT.config(command=myTlist.yview)
def deleteTeacher(): x = myTlist.get(ANCHOR) t = teacher(x[0], x[1], x[2]) t.delete() loadTeacher()