コード例 #1
0
ファイル: WareGroupMapper.cpp プロジェクト: oldbay/dnc_kassa
void WareGroupMapper::fromPersistent(Object* object, const ResultRecord& record) {
    WareGroup* group = (WareGroup*)object;
    group->setCode(record.getValue(GROUP_CODE));
    group->setTitle(record.getValue(GROUP_TITLE));
    group->setText(record.getValue(GROUP_TEXT));
    group->assignParent(fromString<int>(record.getValue(GROUP_PARENT_ID)));
}
コード例 #2
0
ファイル: AdditionMapper.cpp プロジェクト: oldbay/dnc_kassa
void AdditionMapper::fromPersistent(Object* object, const ResultRecord& record) {
    WareAddition * wa = (WareAddition*) object;
    WareAdditionInfo wa_info;
    wa_info.code = record.getValue(ADDITION_CODE);
    wa_info.article = record.getValue(ADDITION_ARTICLE);
    wa_info.price = fromString<double>(record.getValue(ADDITION_PRICE));
    wa_info.quantity = fromString<double>(record.getValue(ADDITION_QUANTITY));
    wa_info.ware_id = fromString<int>(record.getValue(ADDITION_WARE_ID));

    wa->replaceInfo(wa_info);
}
コード例 #3
0
ファイル: TaxRateGrMapper.cpp プロジェクト: oldbay/dnc_kassa
void TaxRateGrMapper::fromPersistent(Object* object, const ResultRecord& record) {

    TaxRateGr * taxrategr = (TaxRateGr*)object;
    TaxRateGrInfo taxrategr_info;

    taxrategr_info.code = fromString<int>(record.getValue( TAXRATEGR_ID_FIELD ));
    taxrategr_info.rate_id = fromString<int>(record.getValue( TAXRATEGR_RATE_ID ));
    taxrategr_info.group_id = fromString<int>(record.getValue( TAXRATEGR_GROUP_ID ));
    taxrategr_info.switchbase = record.getValue( TAXRATEGR_BASE ) == "t" ? true : false;

    taxrategr->setInfo(taxrategr_info);
}
コード例 #4
0
void UserProfileMapper::fromPersistent(Object* object, const ResultRecord& record) {

    UserProfile * profile = (UserProfile*)object;
    UserProfileInfo p_info;

    p_info.profile_code = fromString<int>(record.getValue( PROFILE_ID ));
    p_info.profile_name = record.getValue(PROFILE_NAME);

    p_info.access_rigths[AR_REGISTRATION_BY_CODE] = record.getValue(PROFILE_R_CODEREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_BARCODE] = record.getValue(PROFILE_R_SCANERREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_MANUAL_INPUT_BARCODE] = record.getValue(PROFILE_R_BARCODEMANUALREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_VISUAL_SEARCH] = record.getValue(PROFILE_R_VSREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_CANCEL] = record.getValue(PROFILE_R_CANCELREG) == "t";
    p_info.access_rigths[AR_QUANTITY_EDITION] = record.getValue(PROFILE_R_QUANTITYEDITION) == "t";
    p_info.access_rigths[AR_PRICE_EDITION] = record.getValue(PROFILE_R_PRICEEDITION) == "t";
    p_info.access_rigths[AR_REGISTRATION_REPEAT] = record.getValue(PROFILE_R_REGISTRATION_REPEAT) == "t";
    p_info.access_rigths[AR_CHECK_CANCEL] = record.getValue(PROFILE_R_CHECK_CANCEL) == "t";
    p_info.access_rigths[AR_MANUAL_DISCOUNT] = record.getValue(PROFILE_R_MANUAL_DISCOUNT) == "t";
    p_info.access_rigths[AR_FIXED_DISCOUNT] = record.getValue(PROFILE_R_FIXED_DISCOUNT) == "t";
    p_info.access_rigths[AR_DISCOUNT_CANCEL] = record.getValue(PROFILE_R_DISCOUNT_CANCEL) == "t";
    p_info.access_rigths[AR_RETURN_BY_NUMBER] = record.getValue(PROFILE_R_RETURN_BY_NUMBER) == "t";
    p_info.access_rigths[AR_RETURN_MANUAL] = record.getValue(PROFILE_R_RETURN_MANUAL) == "t";
    p_info.access_rigths[AR_CASH_PAYMENT] = record.getValue(PROFILE_R_CASH_PAYMENT) == "t";
    p_info.access_rigths[AR_CREDIT_PAYMENT] = record.getValue(PROFILE_R_CREDIT_PAYMENT) == "t";
    p_info.access_rigths[AR_CONT_PAYMENT] = record.getValue(PROFILE_R_CONT_PAYMENT) == "t";
    p_info.access_rigths[AR_Z_REPORT] = record.getValue(PROFILE_R_Z_REPORT) == "t";
    p_info.access_rigths[AR_OTHER_REPORT] = record.getValue(PROFILE_R_OTHER_REPORT) == "t";
    p_info.access_rigths[AR_KKM_SYNCHRONIZATION] = record.getValue(PROFILE_R_KKM_SYNCHRONIZATION) == "t";
    p_info.access_rigths[AR_ENTERING] = record.getValue(PROFILE_R_ENTERING) == "t";
    p_info.access_rigths[AR_GETTING] = record.getValue(PROFILE_R_GETTING) == "t";
    p_info.access_rigths[AR_CHECK_COPY] = record.getValue(PROFILE_R_CHECK_COPY) == "t";
    p_info.access_rigths[AR_OPEN_BOX] = record.getValue(PROFILE_R_OPEN_BOX) == "t";
    p_info.access_rigths[AR_PROGRAMM_SETUP] = record.getValue(PROFILE_R_PROGRAMM_SETUP) == "t";
    p_info.access_rigths[AR_HANDLE_UNLOAD] = record.getValue(PROFILE_R_HANDLE_UNLOAD) == "t";
    p_info.access_rigths[AR_HANDLE_UPLOAD] = record.getValue(PROFILE_R_HANDLE_UPLOAD) == "t";
    p_info.access_rigths[AR_PS_RECONSILIATION] = record.getValue(PROFILE_R_PS_RECONSILIATION) == "t";


    profile->replaceInfo(p_info);
}