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


Python Member.number方法代码示例

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


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

示例1: get

# 需要导入模块: from models import Member [as 别名]
# 或者: from models.Member import number [as 别名]
 def get(self):
     db = getUtility(IRelationalDatabase)
     cr = db.cursor()
     number = self.member.number
     if number:
         cr.execute("""SELECT
                         id,
                         number,
                         name
                       FROM members
                       WHERE number = ?""",
                    (number,))
     else:
         cr.execute("""SELECT
                         id,
                         number,
                         name
                       FROM members""")
     rst = cr.fetchall()
     cr.close()
     members = []
     for record in rst:
         id = record['id']
         number = record['number']
         name = record['name']
         member = Member()
         member.id = id
         member.number = number
         member.name = name
         members.append(member)
     return members
开发者ID:eugeneai,项目名称:ZCA,代码行数:33,代码来源:member.py

示例2: on_add_clicked

# 需要导入模块: from models import Member [as 别名]
# 或者: from models.Member import number [as 别名]
 def on_add_clicked(self, *args):
     number = self.ui.number.get_text()
     name = self.ui.name.get_text()
     member = Member()
     member.number = number
     member.name = name
     self.add(member)
     self.ui.list_store.append((member, number, name,))
开发者ID:eugeneai,项目名称:ZCA,代码行数:10,代码来源:vc.py

示例3: book_issue

# 需要导入模块: from models import Member [as 别名]
# 或者: from models.Member import number [as 别名]
    def book_issue(self, member_number, book_barcode):
        member = Member()
        member.number = member_number
        memberdboperation = getAdapter(member, IDbOperation)
        member = memberdboperation.get()[0]

        book = Book()
        book.number = book_barcode
        bookdboperation = getAdapter(book, IDbOperation)
        book = bookdboperation.get()[0]

        circulation = Circulation()
        circulation.member = member
        circulation.book = book
        circulationdboperation = getAdapter(circulation, IDbOperation)
        circulationdboperation.add()
开发者ID:eugeneai,项目名称:ZCA,代码行数:18,代码来源:vc.py

示例4: initialize_lists

# 需要导入模块: from models import Member [as 别名]
# 或者: from models.Member import number [as 别名]
    def initialize_lists(self):
        cm=Gtk.ListStore(object, str, str, str)
        self.ui.catalog=cm
        self.ui.catalog_view.set_model(cm)
        for _ in range(3):
            b=Book()
            b.title="Brotherhood of the ring"
            b.author="J.R.R.Tolkien"
            b.barcode="123-1232"
            self.append_book(b)

        mm=Gtk.ListStore(object, int, str)
        self.ui.members=mm
        self.ui.member_view.set_model(mm)
        for _ in range(3):
            m=Member()
            m.name="Jim Carry"
            m.number=123
            self.append_member(m)
开发者ID:eugeneai,项目名称:ZCA,代码行数:21,代码来源:vc.py


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