本文整理汇总了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)