Ejemplo n.º 1
0
 def displayData(self):
     # clear the panel
     self.scrolledPanel.DestroyChildren()
     self.gbs_excul.Clear()
     
     # collect the variables
     #gVar.schYr    = self.spc_schYr.Value
     gVar.semester = self.spc_semester.Value   
     sch_id        = fetch.cmbID(self.c_schools)
     dayNo         = fetch.cmbID(self.c_day)+1
     
     if not sch_id: return
     
     studentIDs_list=[]
     # get the excul list
     exculIDs   = fetch.exculIDs_forSch(dayNo, gVar.semester, sch_id)
     if exculIDs:
         exculCount = len(exculIDs)
         i = 0
         for excul_id in exculIDs:
             myLV = self.createLV(excul_id, i)
             # fill each listView with members
             studentIDs = lv.populateExcul(myLV, excul_id)
             studentIDs_list.extend(studentIDs)
             i += 1
             
     remainingStudents = fetch.exculRemainingStudents(sch_id, studentIDs_list)
     lv.populateExculRemainingStudents(self.lv1, remainingStudents)
     dt1 = TextDropTarget(self.lv1) # Make this control a Drop Target
     self.lv1.SetDropTarget(dt1)         # Link to Control           
     
     self.scrolledPanel.FitInside() 
     self.Layout() 
Ejemplo n.º 2
0
 def displayData(self):
     #rint'PanelExculViewer2: displayData'
     self.semester_no = self.choice_semester.GetStringSelection()
     
     # clear the panel
     self.scrolledPanel.DestroyChildren()
     self.scrolledPanelSizer.Clear()
     
     # collect the variables
     #gVar.schYr    = self.spc_schYr.Value
     self.semester = self.choice_semester.GetStringSelection()  
     school_id     = fetch.cmbID(self.choice_school)
     dayNo         = fetch.cmbID(self.choice_day)  
     
     #rint">>>", self.semester, ">>>",school_id,">>>", dayNo 
     
     
     if not (school_id and self.semester and dayNo): return
     
     studentIDs_list=[]
     # get the excul list
     exculIDs   = fetch.exculIDs_forSch(dayNo, self.semester, school_id)
     exculIDs = [1,2,3,5,6,7,8,9,11,112,12,13,14,15,16,17,18,19,21,23,24,25,26,27,28]
     
     if exculIDs:
         exculCount = len(exculIDs)
         i = 0
         for excul_id in exculIDs:
             myLV = self.createLV(excul_id, i)
             #rint'createLV ed:', myLV
             # fill each listView with members
             #studentIDs = lv.populateExcul(myLV, excul_id)
             #studentIDs_list.extend(studentIDs)
             i += 1
             
     remainingStudents = fetch.exculRemainingStudents(school_id, studentIDs_list)
     lv.populateExculRemainingStudents(self.list_ctrl_pool, remainingStudents)
     dt1 = TextDropTarget(self.list_ctrl_pool) # Make this control a Drop Target
     self.list_ctrl_pool.SetDropTarget(dt1)         # Link to Control           
     
     self.scrolledPanel.FitInside() 
     self.Layout()