Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 def get_crs_vals():
     L = course.selectcrs()
     LC = []
     for i in L:
         cid = int(i[0])
         cname = i[1]
         cunit = i[2]
         c = course(cid, cname, cunit)
         LC.append(cname)
         ComboCrVals.append([cid, cname, cunit])
     return LC
Ejemplo n.º 3
0
 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()
Ejemplo n.º 4
0
 def saveCourse():
     p = course(int(Ce1.get()), Ce2.get(), int(Ce3.get()))
     result = p.insert()
     if result == 'True':
         messagebox.showinfo('Alert', 'ثبت اطلاعات درس با موفقیت انجام شد.')
         Ce1.delete(0, END)
         Ce2.delete(0, END)
         Ce3.delete(0, END)
         loadCourse()
     else:
         messagebox.showinfo(
             'Alert',
             'در ثبت اطلاعات درس خطایی رخ داده است. (' + result + ')')
Ejemplo n.º 5
0
    def loadCourse():
        myClist.delete(0, 'end')
        L = course.selectcrs()
        L2 = []
        for i in L:
            cid = int(i[0])
            cname = i[1]
            cunit = i[2]
            s = course(cid, cname, cunit)
            L2.append(s)

        scrollbarC.pack(side=RIGHT, fill=Y)
        for i in L2:
            myClist.insert(END, i.show())
        myClist.pack(side=LEFT, fill=BOTH)
        scrollbarC.config(command=myClist.yview)
Ejemplo n.º 6
0
 def deleteCourse():
     x = myClist.get(ANCHOR)
     c = course(x[0], x[1], x[2])
     c.delete()
     loadCourse()