コード例 #1
0
ファイル: student_payments.py プロジェクト: ckSchool/bucky
 def OnSelectSchool(self, evt):
     school_id = fetch.cmbID(self.choice_schools)
     sql = "SELECT id, name \
              FROM forms \
             WHERE school_id = %d \
               AND schYr = %d" % (school_id, gVar.schYr)
     loadCmb.gen(self.choice_forms, sql)
     self.displayData()
コード例 #2
0
 def loadLevels(self):
     school_id = fetch.cmbID(self.choice_schools)
     sql = "SELECT id, name \
              FROM course_levels \
             WHERE school_id = %d \
             GROUP BY level \
             ORDER BY level" % (school_id,)
     loadCmb.gen(self.choice_levels, sql)
     loadCmb.levels_forSchool(self.choice_levels, school_id)
コード例 #3
0
ファイル: accounts_ledger.py プロジェクト: ckSchool/bucky
 def _do_main(self):
     sql = "SELECT id, name FROM acc_accounts "
     loadCmb.gen(self.choice_account, sql)
     #rintsql
     self.dateTo   = datetime.date.today()
     self.dateFrom = self.dateTo - datetime.timedelta(days=365)
     
     self.datepicker_ctrl_from.SetValue(self.dateFrom)
     self.datepicker_ctrl_to.SetValue(self.dateTo)
コード例 #4
0
 def loadCourses(self):
     ##rint'loadCourses'
     school_id = fetch.cmbID(self.choice_schools)
     sql = "SELECT c.id, c.name \
              FROM courses c \
              JOIN courses_by_year cby ON cby.course_id = c.id \
             WHERE c.school_id = %d \
               AND cby.schYr = %d" % (school_id, gVar.schYr)
     ##rintsql
     loadCmb.gen(self.choice_courses, sql)
コード例 #5
0
ファイル: Transaction.py プロジェクト: ckSchool/bucky
 def loadAccounts(self):
     #FORMAT(IIF (d.Debet = True,  d.Jumlah,), '#,##0') 
     sql = "SELECT Kode, Kode & Nama AS title FROM Perkiraan ORDER BY Nama"
     
     sql = "SELECT Kode, \
             Mid(Kode, 1,1) &'.'& \
             Mid(Kode, 2,2) &'.'& \
             Mid(Kode, 4,2) &'.'& \
             Mid(Kode, 6,2) &':  '& Nama AS title\
              FROM Perkiraan ORDER BY Kode"
     
     loadCmb.gen(self.choice_credits, sql, ' ')
     loadCmb.gen(self.choice_debits, sql, ' ')
コード例 #6
0
 def loadForms(self):
     school_id = fetch.cmbID(self.choice_schools)
     level_id  = fetch.cmbID(self.choice_levels)
     level     = fetch.level_level_id(level_id)
     if self.checkbox_filter_by_level.GetValue():
         sql = "SELECT id, name \
                  FROM forms \
                 WHERE level = %d \
                   AND schYr = %d" % (level, gVar.schYr)
     else:
         sql = "SELECT id, name \
                  FROM forms \
                 WHERE school_id = %d \
                   AND schYr = %d" % (school_id, gVar.schYr)
     loadCmb.gen(self.choice_forms, sql)
コード例 #7
0
 def __do_main(self):
     self.dateTo   = datetime.date.today()
     self.dateFrom = self.dateTo - datetime.timedelta(days=365)
     
     self.datepicker_ctrl_from.SetValue(self.dateFrom)
     self.datepicker_ctrl_to.SetValue(self.dateTo)
     
     headings = (('id',0),  
                     ('Receipt No.',100),
                     ('Date',100),
                     ('Student Name',200),
                     ('Form',100),
                     ('Total',100, wx.LIST_FORMAT_RIGHT))
     self.vList.SetColumns(headings)
     
     sql = "SELECT id, item_name FROM invoice_items"
     loadCmb.gen(self.choice_pay_type, sql, 'All')
     
     self.displayData()
コード例 #8
0
 def OnCheckSchool(self, evt):
     if self.checkbox_filter_by_school.GetValue():
         sql = "SELECT id, school_type \
                  FROM schools \
                 WHERE isCK = 1"
         loadCmb.gen(self.choice_schools, sql)
         
         self.loadCourses()
     
         self.choice_schools.Show()
         self.checkbox_filter_by_course.Show()
         if self.checkbox_filter_by_course.GetValue():
             self.choice_courses.Show()
     
     else:
         self.choice_schools.Clear()
         self.checkbox_filter_by_course.Hide()
         self.choice_courses.Hide()
         self.choice_schools.Hide()
         
     self.Layout()
     self.displayData()
コード例 #9
0
 def OnCheckSchool(self, evt):
     #rint'Filter > OnCheckSchool'
     if self.checkbox_filter_by_school.GetValue():
         self.choice_schools.Show()
         sql = "SELECT id, name \
                  FROM schools \
                 WHERE isCK = 1"
         #rintsql
         loadCmb.gen(self.choice_schools, sql)
         self.checkbox_filter_by_level.Show()
         self.OnCheckLevel(wx.Event)
         
     else:
         self.checkbox_filter_by_form.SetValue(False)
         self.checkbox_filter_by_level.SetValue(False)
         self.checkbox_filter_by_form.Hide()
         self.checkbox_filter_by_level.Hide()
         self.choice_levels.Hide()
         self.choice_forms.Hide()
         self.choice_schools.Hide()
         
     self.Layout()
     self.displayData()
コード例 #10
0
ファイル: Transaction.py プロジェクト: ckSchool/bucky
 def loadDivisions(self):
     sql = "SELECT Kode, Nama FROM Divisi ORDER BY Nama"
     loadCmb.gen(self.choice_division, sql, ' ')
コード例 #11
0
ファイル: Transaction.py プロジェクト: ckSchool/bucky
 def loadSuppliers(self):
     sql = "SELECT Kode, Nama FROM Suplier ORDER BY Nama"
     loadCmb.gen(self.choice_supplier, sql, ' ')