Ejemplo n.º 1
0
    def OnProvince(self, event):
	selectedProvinceID, province = fetch.cmbIDV(self.combo_province)
	if selectedProvinceID:
	    countryList = fetch.countriesForProvinceID(selectedProvinceID)
	    if countryList:
		selectedCountryID = fetch.cmbID(self.combo_country)
		self.setGen(selectedCountryID, countryList, self.combo_country)
	# work up ---------------------
	kabupatenList       = fetch.kabupatenForProvinceID(selectedProvinceID)
	selectedKabupatenID = fetch.cmbID(self.combo_kabupaten)
	if selectedKabupatenID in self.idList(kabupatenList):
	    return
	self.clearPostcodeCtrls((self.combo_kecamatan,
				 self.combo_kabupaten,
				 self.combo_kelurahan))
        #  kabupaten --------------------------
        if kabupatenList:
            kabupatenID = self.setComboItems(self.combo_kabupaten, kabupatenList)
            if selectedKabupatenID != kabupatenID:
		pass
Ejemplo n.º 2
0
    def countriesForProvince(self, setID, selectedID):
	cmb = self.combo_country
	cmbID = fetch.cmbID(cmb)
        if selectedID: aList = fetch.countriesForProvinceID(selectedID)
        else:          aList = fetch.countriesForProvinceID(setID)
	return self.setGen(cmbID, aList, cmb)