def on_save(self, event): # wxGlade: institution.<event_handler>
try:
self.DB.Set_School_Name(self.text_ctrl_name.Value)
self.DB.Set_School_Code(self.text_ctrl_code.Value)
self.DB.Set_School_Email(self.text_ctrl_email.Value)
self.DB.Set_School_Contact(self.text_ctrl_phone.Value)
self.DB.Set_School_DEO(self.text_ctrl_deo.Value)
dlg = wx.MessageDialog(self, 'Successfully Saved', '',wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
except:
dlg = wx.MessageDialog(self, 'Could not save some values', '',wx.OK | wx.ICON_ERROR)
dlg.ShowModal()
dlg.Destroy()
self.Close(True)
event.Skip()
评论列表
文章目录