def db_delete(self):
msg="The student "+self.text_ctrl_name.Value+", along with all data, will be deleted\nAre you sure you want to continue?"
dlg = wx.MessageDialog(self, msg,"Warning", wx.YES_NO | wx.ICON_QUESTION)
result = dlg.ShowModal()# == wx.ID_YES
if result==wx.ID_NO:
return 0
dlg.Destroy()
try:
self.DB.Remove_Student_Full(self.combo_box_adno.GetStringSelection())
msg="Successfully Removed Student"
icon=wx.ICON_INFORMATION
except:
msg="Failed to Remove the Student"
icon=wx.ICON_ERROR
dlg = wx.MessageDialog(self, msg, '',wx.OK | icon)
dlg.ShowModal()
dlg.Destroy()
self.load_admission_no()
self.clear_student_details()
self.button_delete.Disable()
评论列表
文章目录