Пример #1
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     setLineEditValue(self.edtFlatCode, record, 'flatCode')
     setLineEditValue(self.edtSyncGUID, record, 'syncGUID')
Пример #2
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtMKB, record, 'MKB')
     setLineEditValue(self.edtMKBEx, record, 'MKBEx')
     self.oldMKB = forceStringEx(self.edtMKB.text())
     self.oldCharacterId = record.value('character_id')
     self.setIsDirty(False)
Пример #3
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setLineEditValue(self.edtDescr, record, 'descr')
     setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     setLineEditValue(self.edtFederalCode, record, 'federalCode')
Пример #4
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(     self.edtCode,   record, rbCode)
     setLineEditValue(     self.edtName,   record, rbName)
     self.cmbColor.setColor(forceString(record.value('color')))
     setDoubleBoxValue(self.edtAmount, record, 'amount')
     setRBComboBoxValue(   self.cmbUnit,   record, 'unit_id')
Пример #5
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(   self.edtCode,          record, 'code')
     setLineEditValue(   self.edtName,          record, 'name')
     self.groupId = forceRef(record.value('group_id'))
     self.modelInItems.loadItems(self.itemId())
     self.modelOutItems.loadItems(self.itemId())
Пример #6
0
 def setRecord(self, record):
     self.cmbResult.setTable('rbResult', True)
     CEventEditDialog.setRecord(self, record)
     setLineEditValue(self.edtNumber, record, 'externalId')
     setDatetimeEditValue(self.edtEndDate, self.edtEndTime, record,
                          'setDate')
     setRBComboBoxValue(self.cmbPerson, record, 'execPerson_id')
     setDatetimeEditValue(self.edtBegDate, self.edtBegTime, record,
                          'execDate')
     setRBComboBoxValue(self.cmbPerson2, record, 'setPerson_id')
     self.chkAutopsy.setChecked(forceInt(record.value('isPrimary')) == 1)
     self.setPersonId(self.cmbPerson.value())
     self.setContract()
     setRBComboBoxValue(self.cmbResult, record, 'result_id')
     setRBComboBoxValue(self.cmbContract, record, 'contract_id')
     setTextEditValue(self.edtNote, record, 'note')
     self.loadDiagnostics(self.modelPreliminaryDiagnostics)
     self.loadDiagnostics(self.modelFinalDiagnostics)
     self.loadActions()
     self.tabCash.load(self.itemId())
     self.tabNotes.setNotes(record)
     self.tabNotes.setEventEditor(self)
     self.tabNotes.updateReferralPeriod(self.edtBegDate.date())
     self.initFocus()
     self.setIsDirty(False)
     self.blankMovingIdList = []
     self.setEditable(self.getEditable())
     setOrgStructureIdToCmbPerson(self.cmbPerson)
Пример #7
0
 def on_cmbArmyNumber_currentIndexChanged(self, index):
     if index == 0:
         self.cmbArmyNumber.lineEdit().setCursorPosition(0)
         self.edtArmyFreeInput.setText('')
         self.edtArmyDate.setDate(QtCore.QDate.currentDate())
         if not QtGui.qApp.userHasRight(urCreateReferral):
             self.enableArmyReferral(False)
             return
     else:
         db = QtGui.qApp.db
         tbl = db.table('Referral')
         cond = [
             tbl['id'].eq(self.cmbArmyNumber.value()), tbl['type'].eq(1)
         ]
         record = db.getRecordEx(tbl, '*', where=cond)
         if record:
             setLineEditValue(self.cmbArmyNumber.lineEdit(), record,
                              'number')
             if not record.value('freeInput').isNull():
                 setLineEditValue(self.edtArmyFreeInput, record,
                                  'freeInput')
                 self.chkArmyFreeInput.setChecked(True)
             else:
                 self.edtArmyFreeInput.setText('')
                 self.chkArmyFreeInput.setChecked(False)
             setDateEditValue(self.edtArmyDate, record, 'date')
             self.cmbArmyOrg.setValue(record.value('relegateOrg_id'))
         else:
             return
     self.enableArmyReferral(True)
Пример #8
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtBIK,           record, 'BIK')
     setLineEditValue(self.edtName,          record, 'name')
     setLineEditValue(self.edtBranchName,    record, 'branchName')
     setLineEditValue(self.edtCorrAccount,   record, 'corrAccount')
     setLineEditValue(self.edtSubAccount,    record, 'subAccount')
Пример #9
0
 def setRecord(self, record):
     CRCReportEditorBase.setRecord(self, record)
     setLineEditValue(self.edtReportName, record, 'name')
     # setTextEditValue(self.textSQL, record, 'sql')
     self.modelCols.loadItems(self.itemId())
     self.modelTableCap.loadItems(self.itemId())
     self.modelParams.loadItems(self.itemId())
Пример #10
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(   self.edtName,         record, 'name')
     setLineEditValue(   self.edtTemplate,     record, 'template')
     setCheckBoxValue(   self.chkTabRegistry,  record, 'tabRegistry')
     setCheckBoxValue(   self.chkTabEvents,    record, 'tabEvents')
     setCheckBoxValue(   self.chkTabAmbCard,   record, 'tabAmbCard')
     setCheckBoxValue(   self.chkTabActions,   record, 'tabActions')
Пример #11
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     setLineEditValue(self.edtFederalCode, record, 'federalCode')
     setLineEditValue(self.edtName, record, 'name')
     setRBComboBoxValue(self.cmbPurpose, record, 'eventTypePurpose_id')
     setLineEditValue(self.edtVisitCount, record, 'visitCount')
Пример #12
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setComboBoxValue(self.cmbType, record, 'type')
     setLineEditValue(self.edtCode, record, rbCode)
     setLineEditValue(self.edtName, record, rbName)
     #        setCheckBoxValue(self.chkAble, record, 'able')
     setComboBoxValue(self.cmbClosed, record, 'closed')
     setComboBoxValue(self.cmbStatus, record, 'status')
Пример #13
0
    def _load(self, actionTypeId):
        record = QtGui.qApp.db.getRecord(self._table, '*', actionTypeId)

        setComboBoxValue(self.cmbSex, record, 'sex')
        (begUnit, begCount, endUnit,
         endCount) = parseAgeSelector(forceString(record.value('age')))
        self.cmbBegAgeUnit.setCurrentIndex(begUnit)
        self.edtBegAgeCount.setText(str(begCount))
        self.cmbEndAgeUnit.setCurrentIndex(endUnit)
        self.edtEndAgeCount.setText(str(endCount))
        setComboBoxValue(self.cmbDefaultStatus, record, 'defaultStatus')
        setComboBoxValue(self.cmbDefaultDirectionDate, record,
                         'defaultDirectionDate')
        setComboBoxValue(self.cmbDefaultPlannedEndDate, record,
                         'defaultPlannedEndDate')
        setComboBoxValue(self.cmbDefaultBeginDate, record, 'defaultBeginDate')
        setComboBoxValue(self.cmbDefaultEndDate, record, 'defaultEndDate')
        setRBComboBoxValue(self.cmbDefaultExecPerson, record,
                           'defaultExecPerson_id')
        setComboBoxValue(self.cmbDefaultPersonInEvent, record,
                         'defaultPersonInEvent')
        setComboBoxValue(self.cmbDefaultPersonInEditor, record,
                         'defaultPersonInEditor')
        self.cmbDefaultOrg.setValue(forceRef(record.value('defaultOrg_id')))
        setComboBoxValue(self.cmbDefaultMKB, record, 'defaultMKB')
        setComboBoxValue(self.cmbDefaultMorphology, record,
                         'defaultMorphology')
        setComboBoxValue(self.cmbIsMorphologyRequired, record,
                         'isMorphologyRequired')
        setLineEditValue(self.edtOffice, record, 'office')
        setCheckBoxValue(self.chkShowInForm, record, 'showInForm')
        setCheckBoxValue(self.chkShowTime, record, 'showTime')
        setCheckBoxValue(self.chkShowAPOrg, record, 'showAPOrg')
        setCheckBoxValue(self.chkShowAPNotes, record, 'showAPNotes')
        setCheckBoxValue(self.chkRequiredCoordination, record,
                         'isRequiredCoordination')
        setComboBoxValue(self.cmbAssistantRequired, record, 'hasAssistant')
        setLineEditValue(self.edtContext, record, 'context')
        setCheckBoxValue(self.chkIsPreferable, record, 'isPreferable')
        setSpinBoxValue(self.edtAmount, record, 'amount')
        setSpinBoxValue(self.edtMaxOccursInEvent, record, 'maxOccursInEvent')
        setComboBoxValue(self.cmbServiceType, record, 'serviceType')
        setCheckBoxValue(self.chkPropertyAssignedVisible, record,
                         'propertyAssignedVisible')
        setCheckBoxValue(self.chkPropertyUnitVisible, record,
                         'propertyUnitVisible')
        setCheckBoxValue(self.chkPropertyNormVisible, record,
                         'propertyNormVisible')
        setCheckBoxValue(self.chkPropertyEvaluationVisible, record,
                         'propertyEvaluationVisible')
        setSpinBoxValue(self.edtRecommendationExpirePeriod, record,
                        'recommendationExpirePeriod')
        setCheckBoxValue(self.chkRecommendationControl, record,
                         'recommendationControl')
        setCheckBoxValue(self.chkExecRequiredForEventExec, record,
                         'isExecRequiredForEventExec')
        setCheckBoxValue(self.chkIgnoreEventEndDate, record,
                         'isIgnoreEventExecDate')
Пример #14
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setTextEditValue(self.edtName, record, 'name')
     setComboBoxValue(self.cmbClass, record, 'class')
     self.cmbGroup.setCode(forceString(record.value('group_code')))
     self.setInputCodeSettings()
     setLineEditValue(self.edtCode, record, 'code')
     self.oldCode = self.edtCode.text()
     self.setIsDirty(False)
Пример #15
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     setLineEditValue(self.edtTicketPrefix, record, 'ticketPrefix')
     getRBComboBoxValue(self.edtOrgStructure, record, 'orgStructure_id')
     getCheckBoxValue(self.chkImmediatelyReady, record,
                      'isImmediatelyReady')
     return record
Пример #16
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setComboBoxValue(self.cmbType, record, 'type')
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setCheckBoxValue(self.checkBox, record, 'requiredDiagnosis')
     setComboBoxValue(self.cmbGrouping, record, 'grouping')
     setSpinBoxValue(self.spinPrimary, record, 'primary')
     setSpinBoxValue(self.spinProlongate, record, 'prolongate')
     setSpinBoxValue(self.spinRestriction, record, 'restriction')
Пример #17
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     kindId = forceRef(record.value('kind_id'))
     classId = forceRef(
         QtGui.qApp.db.translate('rbNomenclatureKind', 'id', kindId,
                                 'class_id'))
     self.cmbClass.setValue(classId)
     self.cmbKind.setValue(kindId)
Пример #18
0
    def setRecord(self, record):
        CItemEditorBaseDialog.setRecord(self, record)
        setLineEditValue(self.edtSubject, record, 'subject')
        setTextEditHTML(self.edtText, record, 'text')

        addressee = record.value('addressee').toInt()[0]
        self.cbxUserGroup.setCurrentIndex(
            self.user_profiles.index(addressee) + 1 if addressee else 0)

        self.setIsDirty(False)
Пример #19
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(   self.edtCode,      record, 'code')
     setLineEditValue(   self.edtName,      record, 'name')
     setComboBoxValue(   self.cmbProtocol,  record, 'protocol')
     setLineEditValue(   self.edtAddress,   record, 'address')
     setLineEditValue(   self.edtOwnName,   record, 'ownName')
     setLineEditValue(   self.edtLabName,   record, 'labName')
     self.modelTests.loadItems(self.itemId())
     self.setIsDirty(False)
Пример #20
0
    def setRecord(self, record):
        CItemEditorBaseDialog.setRecord(self, record)
        setLineEditValue(self.edtCode, record, rbCode)
        setLineEditValue(self.edtName, record, rbName)
        setRBComboBoxValue(self.cmbTestGroup, record, 'testGroup_id')
        setSpinBoxValue(self.edtPosition, record, 'position')

        itemId = self.itemId()
        self.modelTestEquipments.loadItems(itemId)
        self.modelTestAnalog.loadItems(itemId)
Пример #21
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setCheckBoxValue(self.chkEditable, record, 'isEditable')
     setCheckBoxValue(self.chkShowInClientInfo, record, 'showInClientInfo')
     setCheckBoxValue(self.chkIsUnique, record, 'isUnique')
     setCheckBoxValue(self.chkAutoIdentificator, record,
                      'autoIdentificator')
     setRBComboBoxValue(self.cmbCounter, record, 'counter_id')
Пример #22
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setDateEditValue(self.edtDate, record, 'date')
     setDatetimeEditValue(self.edtDeadlineDate, self.edtDeadlineTime,
                          record, 'deadline')
     setCheckBoxValue(self.chkRevoked, record, 'revoked')
     setRBComboBoxValue(self.cmbSupplier, record, 'supplier_id')
     setRBComboBoxValue(self.cmbRecipient, record, 'recipient_id')
     setLineEditValue(self.edtNote, record, 'note')
     self.modelItems.loadItems(self.itemId())
     self.setIsDirty(False)
Пример #23
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtName, record, 'name')
     self.cmbMainTable.setValue(forceInt(record.value('mainTable_id')))
     self.modelTree.setMainTableId(self.cmbMainTable.value())
     self.modelTree.setState('')
     self.modelCols.loadItems(self.itemId())
     self.modelGroups.loadItems(self.itemId())
     self.modelOrders.loadItems(self.itemId())
     self.modelConditions.loadItems(self.itemId())
     self.modelTree.setState(forceString(record.value('stateTree')))
     self.referencedField = forceString(record.value('referencedField'))
     self.cmbReference.setValue(self.referencedField)
Пример #24
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setComboBoxValue(self.cmbSex, record, 'sex')
     (begUnit, begCount, endUnit,
      endCount) = parseAgeSelector(forceString(record.value('age')))
     self.cmbBegAgeUnit.setCurrentIndex(begUnit)
     self.edtBegAgeCount.setText(str(begCount))
     self.cmbEndAgeUnit.setCurrentIndex(endUnit)
     self.edtEndAgeCount.setText(str(endCount))
     # Полю flags можно сделать битовым и хранить в нем несколько разных состояний. Пока там одно, поэтому работаем
     # как с обычным полем со значениями 0-1
     setCheckBoxValue(self.chkUseInCreateClients, record, 'flags')
Пример #25
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     setLineEditValue(self.edtEISRegionalCode, record, 'eisCode')
     setLineEditValue(self.edtName, record, 'name')
     setRBComboBoxValue(self.cmbService, record, 'service_id')
Пример #26
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtName, record, 'name')
     setCheckBoxValue(self.chkShowInClientInfo, record,
                      'isShowInClientInfo')
     setCheckBoxValue(self.chkTightControl, record, 'tightControl')
     if u'онко' in QtGui.qApp.currentOrgInfis():
         setCheckBoxValue(self.chkSoftControl, record, 'softControl')
     else:
         self.chkSoftControl.setVisible(False)
     setCheckBoxValue(self.chkAutoDateClose, record, 'autoCloseDate')
     self.groupId = forceRef(record.value('group_id'))
     self.modelTypes.loadItems(self.itemId())
     self.setIsDirty(False)
Пример #27
0
    def setRecord(self, record):
        CItemEditorBaseDialog.setRecord(self, record)
        self.tableId = forceInt(record.value('rcTable_id'))
        self.loadAvaliableFields(self.tableId)

        setLineEditValue(self.edtName, record, 'name')
        setTextEditValue(self.edtDescription, record, 'description')
        setCheckBoxValue(self.chkVisible, record, 'visible')
        currentField = forceString(record.value('field'))
        for index, field in enumerate(self.fields):
            if field == currentField:
                self.cmbField.setCurrentIndex(index)
                break
        ref_id = forceInt(record.value('ref_id'))
        self.chkHasReference.setChecked(forceBool(ref_id))
        self.setReferenceValue(ref_id)
Пример #28
0
 def setRecord(self, record):
     CItemEditorBaseDialog.setRecord(self, record)
     setLineEditValue(self.edtName, record, 'name')
     setLineEditValue(self.edtCode, record, 'code')
     setLineEditValue(self.edtText, record, 'title')
     setLineEditValue(self.edtRbTableName, record, 'tableName')
     setRBComboBoxValue(self.cmbValueType, record, 'valueType_id')
     setRBComboBoxValue(self.cmbParamType, record, 'type_id')
     self.modelCmbValue.loadItems(self.itemId())
Пример #29
0
 def setRecord(self, record):
     CItemEditorDialog.setRecord(self, record)
     setLineEditValue(self.edtProg, record, 'prog')
     setLineEditValue(self.edtPreferentArchiver, record,
                      'preferentArchiver')
     setCheckBoxValue(self.chkEmailRequired, record, 'emailRequired')
     setLineEditValue(self.edtEmailTo, record, 'emailTo')
     setLineEditValue(self.edtSubject, record, 'subject')
     setTextEditHTML(self.edtMessage, record, 'message')
Пример #30
0
 def setRecord(self, record):
     CEventEditDialog.setRecord(self, record)
     setLineEditValue(self.edtCardNo, record, 'externalId')
     setDatetimeEditValue(self.edtBegDate, self.edtBegTime, record,
                          'setDate')
     setDatetimeEditValue(self.edtEndDate, self.edtEndTime, record,
                          'execDate')
     setRBComboBoxValue(self.cmbPerson, record, 'execPerson_id')
     setRBComboBoxValue(self.cmbResult, record, 'result_id')
     # setComboBoxValue(self.cmbOrder,         record, 'order')
     self.cmbOrder.setCode(forceString(record.value('order')))
     setCheckBoxValue(self.chkLock, record, 'locked')
     self.setPersonId(self.cmbPerson.value())
     self.loadDiagnostics()
     self.initFocus()
     self.setIsDirty(False)
     self.setEditable(self.getEditable())