本文整理匯總了Python中DBManager.DBManager.countCanchas方法的典型用法代碼示例。如果您正苦於以下問題:Python DBManager.countCanchas方法的具體用法?Python DBManager.countCanchas怎麽用?Python DBManager.countCanchas使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.countCanchas方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: CanchasTabJuego
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import countCanchas [as 別名]
#.........這裏部分代碼省略.........
elif status == '3':
result['status'] = 'Cerrada'
InfoDialog( self, id=wx.ID_ANY, title="Informacion de Horario", data=result )
def __postReserva( self, evt ):
data = evt.data['old_data']
precio = evt.data['precio']
cliente = evt.data['cliente']
msg = evt.data['msg']
result = None
if not msg[0]:
if date_selected.GetDate() is not None:
result = self.DBM.doReserva(date_selected.GetDate(),data[0], data[1], precio, cliente)
else:
result = self.DBM.doReserva(datetime.datetime.now().strftime("%m/%d/%y %H:%M:%S").__str__(),data[0], data[1], precio, cliente)
if result:
wx.MessageBox('La reserva fue exitosa', 'Reversa Exitosa',
wx.OK | wx.ICON_INFORMATION)
else:
wx.MessageBox('Este horario estaba reservado', 'Reseva Cancelada',
wx.OK | wx.ICON_HAND)
else:
wx.MessageBox(msg[1], 'Error',
wx.OK | wx.ICON_ERROR)
self.OnCalSelected( date_selected )
def buildCells(self, this_time=None):
cells = list()
c_canchas = self.DBM.countCanchas()
n_canchas = self.DBM.getCanchasNames()
horarios = ['14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
if this_time == 'None':
this_time = datetime.datetime.now().strftime("%m/%d/%y %H:%M:%S")
cells.append({'label' : 'HORARIOS',
'header' : True,
'data' : None,
'cliente' : '',
'precio' : ''})
for nombre in n_canchas:
cells.append( {'label' : nombre[1],
'header' : True,
'data' : None,
'cliente' : '',
'precio' : ''} )
for hora in horarios:
cells.append( {'label' : "%s:00 hs" % hora,
'header' : True,
'data' : None,
'cliente' : '',
'precio' : ''} )
for cancha in n_canchas:
status = self.DBM.getCanchaStatus(this_time, cancha[0], hora)
paso = True
cliente = ''
precio = ''