예제 #1
0
 def onEdit(self):
     """"""
     bookDict = self.getData()
     #comboDict = dict(authorDict.items() + bookDict.items())
     controller.editRecord(self.selectedRow.id, bookDict)
     commonDlgs.showMessageDlg("Config Item Edited Successfully!",
                               "Success", wx.ICON_INFORMATION)
     self.Destroy()
예제 #2
0
 def onEdit(self):
     """"""
     authorDict, bookDict = self.getData()
     comboDict = dict(authorDict.items() + bookDict.items())
     controller.editRecord(self.selectedRow.id, comboDict)
     commonDlgs.showMessageDlg("Book Edited Successfully!", "Success",
                               wx.ICON_INFORMATION)
     self.Destroy()
    def onEdit(self):
        """ 
        Method to edit data from the database
        """
        # Get the text input fields from the form.
        dictAuthor, dictBook = self.getData()

        # Create a dictonary of dictonaries.
        data = ({'author': dictAuthor, 'book': dictBook})
        controller.editRecord(self.selectedRow.id, data)

        # display a dialog to notify the end user that the record has been updated.
        commonDlgs.showMessageDlg("Edited Successfully!", "Success!",
                                  wx.ICON_INFORMATION)

        self.Destroy()
예제 #4
0
파일: addModRecord.py 프로젝트: cmal/bqd_hr
    def onEdit(self):
#        row = self.getData()
#        err_dict = {0:u"新增人员",
#                1:u"员工号重复",
#                9:u"操作失败:未知错误",}
        res = controller.editRecord(self.selectedRow.id, self.info_dict)
#        if res == 0:
#            wx.MessageBox(u"操作成功:"+err_dict[res], "Success")
        self.Destroy()