当前位置: 首页>>代码示例>>C++>>正文


C++ MetaSQLQuery::toQuery方法代码示例

本文整理汇总了C++中MetaSQLQuery::toQuery方法的典型用法代码示例。如果您正苦于以下问题:C++ MetaSQLQuery::toQuery方法的具体用法?C++ MetaSQLQuery::toQuery怎么用?C++ MetaSQLQuery::toQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MetaSQLQuery的用法示例。


在下文中一共展示了MetaSQLQuery::toQuery方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sFillList

void assessFinanceCharges::sFillList()
{
  _invoiceList->clear();
  XSqlQuery arFillInvoiceList;
  MetaSQLQuery mql = mqlLoad("assessFinanceCharges", "detail");
  ParameterList params;
  _customerSelector->appendValue(params);
  params.append("assessmentDate", _assessmentDate->date());
  arFillInvoiceList = mql.toQuery(params);
  _invoiceList->populate(arFillInvoiceList);
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:11,代码来源:assessFinanceCharges.cpp

示例2: sFillList

void cashReceiptsEditList::sFillList()
{
    XSqlQuery cashFillList;
    ParameterList params;
    if (! setParams(params))
        return;

    MetaSQLQuery mql = mqlLoad("unpostedCashReceipts", "detail");
    cashFillList = mql.toQuery(params);
    _cashrcpt->populate(cashFillList);
}
开发者ID:shackbarth,项目名称:qt-client,代码行数:11,代码来源:cashReceiptsEditList.cpp

示例3: sRemove

void updatePrices::sRemove()
{
  XSqlQuery updateRemove;
  MetaSQLQuery mql = mqlLoad("updateprices", "remove");
  ParameterList params;
  params.append("ipshead_id", _sel->id());
  updateRemove = mql.toQuery(params);
  if (updateRemove.lastError().type() != QSqlError::NoError)
    systemError(this, updateRemove.lastError().databaseText(), __FILE__, __LINE__);
  populate();
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:11,代码来源:updatePrices.cpp

示例4: sPopulateShipVia

void printPackingListBatchByShipvia::sPopulateShipVia()
{
  ParameterList params;
  if (_metrics->boolean("MultiWhs"))
    params.append("MultiWhs");
  MetaSQLQuery mql = mqlLoad("packingListBatchByShipVia", "shipVia");
  q = mql.toQuery(params);

  _shipvia->populate(q);
  if (q.lastError().type() != QSqlError::NoError)
    systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);
}
开发者ID:Wushaowei001,项目名称:xtuple-1,代码行数:12,代码来源:printPackingListBatchByShipvia.cpp

示例5: sPopulateUOM

void creditMemoItem::sPopulateUOM()
{
  if (_item->id() != -1)
  {
    // Get list of active, valid Selling UOMs
    MetaSQLQuery muom = mqlLoad("uoms", "item");
    
    ParameterList params;
    params.append("uomtype", "Selling");
    params.append("item_id", _item->id());
    
    // Include Global UOMs
    if (_privileges->check("MaintainUOMs"))
    {
      params.append("includeGlobal", true);
      params.append("global", tr("-Global"));
    }
    
    // Also have to factor UOMs previously used on Sales Credit now inactive
    if (_cmitemid != -1)
    {
      XSqlQuery cmuom;
      cmuom.prepare("SELECT cmitem_qty_uom_id, cmitem_price_uom_id "
                    "  FROM cmitem"
                    " WHERE(cmitem_id=:cmitem_id);");
      cmuom.bindValue(":cmitem_id", _cmitemid);
      cmuom.exec();
      if (ErrorReporter::error(QtCriticalMsg, this, tr("Getting Sales Credit UOMs"),
                               cmuom, __FILE__, __LINE__))
        return;
      else if (cmuom.first())
      {
        params.append("uom_id", cmuom.value("cmitem_qty_uom_id"));
        params.append("uom_id2", cmuom.value("cmitem_price_uom_id"));
      }
    }
    
    XSqlQuery uom = muom.toQuery(params);
    if (ErrorReporter::error(QtCriticalMsg, this, tr("Getting UOMs"),
                             uom, __FILE__, __LINE__))
      return;
    
    int saveqtyuomid = _qtyUOM->id();
    int savepriceuomid = _pricingUOM->id();
    disconnect(_qtyUOM,     SIGNAL(newID(int)), this, SLOT(sQtyUOMChanged()));
    disconnect(_pricingUOM, SIGNAL(newID(int)), this, SLOT(sPriceUOMChanged()));
    _qtyUOM->populate(uom);
    _pricingUOM->populate(uom);
    _qtyUOM->setId(saveqtyuomid);
    _pricingUOM->setId(savepriceuomid);
    connect(_qtyUOM,     SIGNAL(newID(int)), this, SLOT(sQtyUOMChanged()));
    connect(_pricingUOM, SIGNAL(newID(int)), this, SLOT(sPriceUOMChanged()));
  }
开发者ID:dwatson78,项目名称:qt-client,代码行数:53,代码来源:creditMemoItem.cpp

示例6: sFillList

void selectPayments::sFillList()
{
  XSqlQuery selectFillList;
  if(_ignoreUpdates)
    return;

//  if (_vendorgroup->isSelectedVend())
//    _apopen->showColumn(9);
//  else
//    _apopen->hideColumn(9);

  if ( (_selectDate->currentIndex() == 1 && !_onOrBeforeDate->isValid())  ||
        (_selectDate->currentIndex() == 2 && (!_startDate->isValid() || !_endDate->isValid())) )
    return;

  int _currid = -1;
  if (_bankaccnt->isValid())
  {
    selectFillList.prepare( "SELECT bankaccnt_curr_id "
               "FROM bankaccnt "
               "WHERE (bankaccnt_id=:bankaccnt_id);" );
    selectFillList.bindValue(":bankaccnt_id", _bankaccnt->id());
    selectFillList.exec();
    if (selectFillList.first())
      _currid = selectFillList.value("bankaccnt_curr_id").toInt();
  }

  ParameterList params;
  if (! setParams(params))
    return;
  params.append("voucher", tr("Voucher"));
  params.append("debitMemo", tr("Debit Memo"));
  params.append("creditMemo", tr("Credit Memo"));
  if (_selectDate->currentIndex()==1)
    params.append("olderDate", _onOrBeforeDate->date());
  else if (_selectDate->currentIndex()==2)
  {
    params.append("startDate", _startDate->date());
    params.append("endDate", _endDate->date());
  }
  if (_currid >= 0)
    params.append("curr_id", _currid);

  MetaSQLQuery mql = mqlLoad("apOpenItems", "selectpayments");
  selectFillList = mql.toQuery(params);
  _apopen->populate(selectFillList,true);
  if (selectFillList.lastError().type() != QSqlError::NoError)
  {
    systemError(this, selectFillList.lastError().databaseText(), __FILE__, __LINE__);
    return;
  }
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:52,代码来源:selectPayments.cpp

示例7: sFillList

void priceList::sFillList()
{
  bool    ok = false;
  QString errString;
  MetaSQLQuery pricelistm = MQLUtil::mqlLoad("pricelist", "detail",
                                          errString, &ok);
  if (! ok)
  {
    ErrorReporter::error(QtCriticalMsg, this, tr("Error Occurred"),
                         tr("%1: %2")
                         .arg(windowTitle())
                         .arg(errString),__FILE__,__LINE__);
    return;
  }

  ParameterList pricelistp;
  pricelistp.append("na",               tr("N/A"));
  pricelistp.append("customer",         tr("Customer"));
  pricelistp.append("shipTo",           tr("Cust. Ship-To"));
  pricelistp.append("shipToPattern",    tr("Cust. Ship-To Pattern"));
  pricelistp.append("custType",         tr("Cust. Type"));
  pricelistp.append("custTypePattern",  tr("Cust. Type Pattern"));
  pricelistp.append("shipZone",         tr("Shipping Zone"));
  pricelistp.append("saleType",         tr("Sale Type"));
  pricelistp.append("sale",             tr("Sale"));
  pricelistp.append("listPrice",        tr("List Price"));
  pricelistp.append("nominal",          tr("Nominal"));
  pricelistp.append("discount",         tr("Discount"));
  pricelistp.append("markup",           tr("Markup"));
  pricelistp.append("item_id",          _item->id());
  pricelistp.append("warehous_id",      _warehouse->id());
  pricelistp.append("prodcat_id",       _prodcatid);
  pricelistp.append("cust_id",          _cust->id());
  pricelistp.append("custtype_id",      _custtypeid);
  pricelistp.append("custtype_code",    _custtypecode);
  pricelistp.append("saletype_id",      _saletypeid);
  pricelistp.append("shipzone_id",      _shipzoneid);
  pricelistp.append("shipto_id",        _shiptoid);
  pricelistp.append("shipto_num",       _shiptonum);
  pricelistp.append("curr_id",          _curr_id);
  pricelistp.append("effective",        _effective);
  pricelistp.append("asof",             _asOf);
  pricelistp.append("qty",              _qty->toDouble());
  pricelistp.append("item_listcost",    _listCost->toDouble());
  pricelistp.append("item_unitcost",    _unitCost->toDouble());
  pricelistp.append("item_listprice",   _listPrice->toDouble());
  pricelistp.append("listpricesched",   _listpriceschedule);

  XSqlQuery pricelistq = pricelistm.toQuery(pricelistp);
  _price->populate(pricelistq, true);
}
开发者ID:dwatson78,项目名称:qt-client,代码行数:51,代码来源:priceList.cpp

示例8: sFillList

void unappliedARCreditMemos::sFillList()
{
  MetaSQLQuery mql = mqlLoad("arCreditMemos", "unapplied");
  
  ParameterList params;
  
  XSqlQuery qry = mql.toQuery(params);
  _aropen->populate(qry);
  if (qry.lastError().type() != QSqlError::NoError)
  {
    systemError(this, qry.lastError().databaseText(), __FILE__, __LINE__);
    return;
  }
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:14,代码来源:unappliedARCreditMemos.cpp

示例9: sFillList

void selectedPayments::sFillList()
{
  ParameterList params;
  if (! setParams(params))
    return;
  MetaSQLQuery mql = mqlLoad("apOpenItems", "selectedpayments");
  q = mql.toQuery(params);
  _apselect->populate(q,true);
  if (q.lastError().type() != QSqlError::NoError)
  {
    systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);
    return;
  }
}
开发者ID:Wushaowei001,项目名称:xtuple-1,代码行数:14,代码来源:selectedPayments.cpp

示例10: populate

void saleType::populate()
{
  MetaSQLQuery mql = mqlLoad("saletype", "table");
  ParameterList params;
  params.append("ViewMode");
  params.append("saletype_id", _saletypeid);
  XSqlQuery saleTypePopulate = mql.toQuery(params);
  if (saleTypePopulate.first())
  {
    _code->setText(saleTypePopulate.value("saletype_code"));
    _description->setText(saleTypePopulate.value("saletype_descr"));
    _active->setChecked(saleTypePopulate.value("saletype_active").toBool());
  }
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:14,代码来源:saleType.cpp

示例11: sFillList

void pricingScheduleAssignments::sFillList()
{
  MetaSQLQuery mql = mqlLoad("pricingScheduleAssignment", "detail");

  ParameterList params;
  if (_listpricesched)
    params.append("listpricesched", true);
  XSqlQuery ps = mql.toQuery(params);
  if(!ErrorReporter::error(QtCriticalMsg, this, tr("Pricing Schedule Assignments "),
                         ps.lastError(), __FILE__, __LINE__))
  {
    _ipsass->populate(ps, true);
  }
}
开发者ID:dwatson78,项目名称:qt-client,代码行数:14,代码来源:pricingScheduleAssignments.cpp

示例12: sFillList

void unappliedARCreditMemos::sFillList()
{
  MetaSQLQuery mql = mqlLoad("arCreditMemos", "unapplied");
  
  ParameterList params;
  
  XSqlQuery qry = mql.toQuery(params);
  _aropen->populate(qry);
  if (ErrorReporter::error(QtCriticalMsg, this, tr("Error Retrieving Unapplied AR Credit Memo Information"),
                                qry, __FILE__, __LINE__))
  {
    return;
  }
}
开发者ID:dwatson78,项目名称:qt-client,代码行数:14,代码来源:unappliedARCreditMemos.cpp


注:本文中的MetaSQLQuery::toQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。