프로젝트

일반

사용자정보

개정판 3590ad41

ID3590ad414a6c78a2e626a99d205ba90ba51e81d4
상위 c971ebe0
하위 c0afc0f6

함의성이(가) 4년 이상 전에 추가함

issue #49: import allowable

Change-Id: I234cce6c4f44820da4776c7602a0442fb90b13b7

차이점 보기:

DTI_PID/DTI_PID/CodeTableDialog.py
320 320
        @date       2018.07.10
321 321
    '''
322 322

  
323
    def fill_codes(self, table, tableDatas):
323
    def fill_codes(self, table, tableDatas, from_exel=False):
324 324
        try:
325 325
            table.setRowCount(len(tableDatas))
326 326
            row = 0
327 327
            for tableData in tableDatas:
328 328
                table.setItem(row, 0, QTableWidgetItem(tableData[0]))  # UID
329
                table.setItem(row, 1, QTableWidgetItem(tableData[1]))  # Name
329
                table.setItem(row, 1, QTableWidgetItem(tableData[1]))  # Code
330 330
                table.setItem(row, 2, QTableWidgetItem(tableData[2] if tableData[2] else ''))  # Description
331
                table.setItem(row, 3, QTableWidgetItem((tableData[3] if type(tableData[3]) is str else ','.join(tableData[3])) \
332
                                                                            if tableData[3] else ''))  # Allowables
331
                if not from_exel:
332
                    table.setItem(row, 3, QTableWidgetItem((tableData[3] if type(tableData[3]) is str else ','.join(tableData[3])) \
333
                                                                                if tableData[3] else ''))  # Allowables
334
                else:
335
                    table.setItem(row, 3, QTableWidgetItem(self.makeAllowable(tableData[1]) if tableData[1] else ''))
336

  
333 337
                row += 1
334 338
        except Exception as ex:
335 339
            from App import App
......
538 542
                item = table.item(row, 1)
539 543
                if not item: return
540 544
                code = item.text()
545
                if code == '': return
546

  
541 547
                if column == 1:
542 548
                    result = self.isExistCode(table, code)
543 549
                    if result:
......
775 781

  
776 782
                    row_index += 1
777 783

  
778
                self.fill_codes(table, codes)
784
                from_exel = True if self.ui.checkBoxAllowable.isChecked() else False
785
                self.fill_codes(table, codes, from_exel=from_exel)
779 786
        except Exception as ex:
780 787
            from App import App
781 788
            from AppDocData import MessageType

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)