Exemplo n.º 1
0
Arquivo: wx.py Projeto: VoidStarSp/wx
def text_reply(msg):
    if msg['Text'] == '记账':
        return u'《购买明细》:\n[金额]:\n[物品]:\n'
    if '《购买明细》:' in msg['Text']:
        msgText = msg['Text']
        time = msg['CreateTime']
        amount = msgText[msgText.index('[金额]:') + 4 : msgText.index('[物品]:')]
        items =  msgText[msgText.index('[物品]:') + 4 :]
        bi = bill.Bill(msg['User']['NickName'], amount, items)
        bill.record_bill(bill)
Exemplo n.º 2
0
 def addshortcuts(self):
     f = Frame(self.master, bd=1, relief=SUNKEN)
     f.pack()
     photo = PhotoImage(file="./images/bill.png")
     b = Button(f,
                image=photo,
                text="bill",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: bill.Bill())
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/purchase.png")
     b = Button(f,
                image=photo,
                text="purchase",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: purchase.addStock())
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/patient.png")
     b = Button(f,
                image=photo,
                text="patient",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: patient.Patient())
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/donor.png")
     b = Button(f,
                image=photo,
                text="donor",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: donor.Donor())
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/new.png")
     b = Button(f,
                image=photo,
                text="Services",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: service.Inv())
     b.pack(side=LEFT)
     b.image = photo
Exemplo n.º 3
0
 def __init__(self):
     self.master = Tk()
     self.master.config(width=600, height=400)
     self.master.title("Lions Dialysis Center")
     self.addmenus()
     self.addshortcuts()
     f = Frame(self.master)
     bill.Bill(f).pack()
     f.pack()
     st = balanceFrame(self.master)
     st.pack(fill=X, expand=1)
     self.master.mainloop()
Exemplo n.º 4
0
 def addshortcuts(self):
     f = Frame(self, bd=1, relief=SUNKEN)
     f.pack()
     photo = PhotoImage(file="./images/bill.png")
     b = Button(f,
                image=photo,
                text="bill",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda x=self: bill.Bill(x))
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/purchase.png")
     b = Button(f,
                image=photo,
                text="purchase",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda x=self: purchase.addStock(x))
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/return.png")
     b = Button(f,
                image=photo,
                text="cancel",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda x=self: cancel.Cancel(x))
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/new.png")
     b = Button(f,
                image=photo,
                text="new",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: new.adder())
     b.pack(side=LEFT)
     b.image = photo
     photo = PhotoImage(file="./images/patient.png")
     b = Button(f,
                image=photo,
                text="patient",
                compound=BOTTOM,
                width=100,
                height=100,
                command=lambda: patient.Patient())
     b.pack(side=LEFT)
     b.image = photo
Exemplo n.º 5
0
 def __init__(self):
     Tk.__init__(self)
     self.checkdb()
     self.config(width=600, height=400)
     self.title("Mukunda Pharmacy")
     self.addmenus()
     self.addshortcuts()
     self.stock = []
     self.restock()
     f = Frame(self)
     bill.Bill(self, f).pack()
     f.pack()
     self.addstatus()
     self.mainloop()
Exemplo n.º 6
0
def new_bill():
    myBill = bill.Bill([])
Exemplo n.º 7
0
 def new_bill(self, p):
     self.bills.append(bill.Bill(p))
     p.set_bill(self.bills[-1])