当前位置: 首页>>代码示例>>Python>>正文


Python SqlHandler.makeCopy方法代码示例

本文整理汇总了Python中models.SqlHandler.makeCopy方法的典型用法代码示例。如果您正苦于以下问题:Python SqlHandler.makeCopy方法的具体用法?Python SqlHandler.makeCopy怎么用?Python SqlHandler.makeCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.SqlHandler的用法示例。


在下文中一共展示了SqlHandler.makeCopy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
    def __init__(self, parent=None, item=None):
        owner = None
        animal = None
        #check if item is dictionary. So it is called by ownerTab
        if(item != None and item.__class__.__name__ == 'dict'):
            if("owner" in item):
                owner = item["owner"]
            if("animal" in item):
                animal = item["animal"]
            item = None

        GenericTab.__init__(self, parent=parent, item=item)
        self.ui = Ui_Visit()
        self.ui.setupUi(self)
        self.ui.stackedWidget.setCurrentIndex(0) #TODO:remove if needed

        self.currentVisitAnimal = None
        self.currentOperation = None
        
        self.configure()
        self.createConnections()

        self.setBasicInfo()
        if(owner != None):
            owner = SqlHandler.makeCopy(self.session,owner)
            self.ownerserachline.setCurrentItem(owner)
            if(animal != None):
                animal = SqlHandler.makeCopy(self.session,animal)
                self.animalTreeWidget.addAskedItem(animal) #TODO find function to add animal
            self.disableAnimalTree(False)
开发者ID:mape90,项目名称:VetApp,代码行数:32,代码来源:visittab.py

示例2: __init__

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
 def __init__(self, parent=None, item=None, animal=None):
     from uipy.ui_phonerecipiedialog import Ui_PhoneRecipieDialog
     QDialog.__init__(self, parent=parent)
     self.ui = Ui_PhoneRecipieDialog()
     self.ui.setupUi(self)
     self.session = SqlHandler.newSession()
     self.item = item
     self.animal = None
     if animal != None:
         self.animal = SqlHandler.makeCopy(self.session, animal)
     
     self.configure()
     self.createConnections()
     self.setBasicInfo()
开发者ID:mape90,项目名称:VetApp,代码行数:16,代码来源:generictreewidget.py

示例3: __init__

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
 def __init__(self, parent, item=None, deftype='Item'):
     QDialog.__init__(self,parent=parent)
     self.ui = Ui_ItemCreatorDialog()
     self.ui.setupUi(self)
     self.session = SqlHandler.newSession()
     self.deftype = deftype
     
     self.item = item
     if self.item != None:
         self.item = SqlHandler.makeCopy(self.session, self.item)
         self.session.add(self.item)
     
     self.configure()
     self.configureConnections()
     self.setBasicInfo()
     
     self.selectCorrectItem()
开发者ID:mape90,项目名称:VetApp,代码行数:19,代码来源:itemcreatordialog.py

示例4: __init__

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
    def __init__(self, parent=None, item=None):
        QDialog.__init__(self, parent)
        self.ui = Ui_OperationCreator()
        self.ui.setupUi(self)
        self.session = SqlHandler.newSession()
        if item != None:
            self.item = SqlHandler.makeCopy(self.session, item)
        else:
            self.item = None


        from models.operation import SurgeryBaseItem
        self.itemTreeWidget =  ItemTreeWidget(session = self.session, parent=self, creator=SurgeryBaseItem)
        self.itemTreeWidget.setTitle("Leikkauksen tavarat")
        self.ui.itemPageLayout.addWidget(self.itemTreeWidget)
        
        self.itemSearchEdit = SearchLineEdit(tabcreator=ItemCreatorDialog, session=self.session, 
                                             parent=self, function=SqlHandler.searchItem)
        
        self.ui.searchLineEditLayout.insertWidget(0,self.itemSearchEdit)
        self.configureConnections()
        self.setBasicInfo()
开发者ID:mape90,项目名称:VetApp,代码行数:24,代码来源:operationbasecreator.py

示例5: addAskedItem

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
 def addAskedItem(self, item):
     if item != None:
         self.addItemToTree(SqlHandler.makeCopy(self.session, item))
开发者ID:mape90,项目名称:VetApp,代码行数:5,代码来源:generictreewidget.py

示例6: addAskedItem

# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
 def addAskedItem(self, item):
     print("DEBUG: SearchLineEdit: addAskedItem() item: ", item)
     if item != None:
         self.setCurrentItem(SqlHandler.makeCopy(self.session, item))
开发者ID:mape90,项目名称:VetApp,代码行数:6,代码来源:searchlineedit.py


注:本文中的models.SqlHandler.makeCopy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。