def Validate_Adm_No(self,value):
if not value.isdigit() and value!="":
'''dlg = wx.MessageDialog(None, 'Admission No should be integer', '',wx.OK | wx.ICON_ERROR)
dlg.ShowModal()
dlg.Destroy()
'''
return 0
else: # if admission no already exists
if self.DB.Admission_Exists(value)!=False:
print 'Admission No: ',value,' is already allotted to', self.DB.Admission_Exists(value)[1]
return 0
return 1
评论列表
文章目录