本文整理匯總了Python中models.SqlHandler.searchVet方法的典型用法代碼示例。如果您正苦於以下問題:Python SqlHandler.searchVet方法的具體用法?Python SqlHandler.searchVet怎麽用?Python SqlHandler.searchVet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.SqlHandler
的用法示例。
在下文中一共展示了SqlHandler.searchVet方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setVet
# 需要導入模塊: from models import SqlHandler [as 別名]
# 或者: from models.SqlHandler import searchVet [as 別名]
def setVet(self):
self.ui.billVetBox.clear()
self.ui.visitVetBox.clear()
self.ui.visitVetBox.addItem('',None)
self.ui.billVetBox.addItem('',None)
for vet_temp in SqlHandler.searchVet(self.session):
self.ui.visitVetBox.addItem(vet_temp.name, vet_temp)
self.ui.billVetBox.addItem(vet_temp.name, vet_temp)
示例2: setVets
# 需要導入模塊: from models import SqlHandler [as 別名]
# 或者: from models.SqlHandler import searchVet [as 別名]
def setVets(self, vet=None): #TODO: select last used vet
self.ui.vetComboBox.clear()
for vet_temp in SqlHandler.searchVet(self.session):
self.ui.vetComboBox.addItem(vet_temp.name, vet_temp)
if vet != None and vet.name == vet_temp.name:
tmp_index = self.ui.vetComboBox.findText(vet_temp.name)
if tmp_index >= 0:
self.ui.vetComboBox.setCurrentIndex(tmp_index)
示例3: setVet
# 需要導入模塊: from models import SqlHandler [as 別名]
# 或者: from models.SqlHandler import searchVet [as 別名]
def setVet(self, vet=None):
self.ui.vetComboBox.clear()
for vet_temp in SqlHandler.searchVet(self.session):
self.ui.vetComboBox.addItem(vet_temp.name, vet_temp)
if vet != None:
for index in range(0, self.ui.vetComboBox.count()):
if self.ui.vetComboBox.itemData(index).id == vet.id:
self.ui.vetComboBox.setCurrentIndex(index)
return
else:
pass #TODO: Select current vet! ConfigServer
示例4: setVets
# 需要導入模塊: from models import SqlHandler [as 別名]
# 或者: from models.SqlHandler import searchVet [as 別名]
def setVets(self):
self.ui.comboBox.clear()
self.ui.comboBox.addItem('Uusi', None)
for vet_temp in SqlHandler.searchVet(self.session):
self.ui.comboBox.addItem(vet_temp.name, vet_temp)
if self.item != None:
for index in range(0, self.ui.comboBox.count()):
if self.ui.comboBox.itemData(index).id == self.item.id:
self.ui.comboBox.setCurrentIndex(index)
return
self.ui.comboBox.setCurrentIndex(0)