zoukankan      html  css  js  c++  java
  • Find方法 Exist方法

    在ax中新建表时,通常要实现这两个方法,以便于重用。下面贴出Find与Exists方法示例,摘自表InvenBatch

    Find方法:

    static InventBatch find(InventBatchId _inventBatchId, ItemId _itemId, boolean _forupdate = false)
    {
        InventBatch inventBatch;
        ;
        inventBatch.selectForUpdate(_forupdate);

        if (_inventBatchId)
        {
            select firstonly inventBatch
                index hint itemBatchIdx
                where inventBatch.ItemId    == _itemId       &&
                      inventBatch.InventBatchId   == _inventBatchId;

        }

        return inventBatch;
    }

    Exists方法:

    static boolean exist(
        ItemId          itemId,
        InventBatchId   batchId
        )
    {
        return (select inventBatch
                    index hint itemBatchIdx
                    where inventBatch.ItemId        == itemId    &&
                          inventBatch.InventBatchId == batchId).RecId != 0;
    }

  • 相关阅读:
    心血来潮学python
    lua中的table、stack和registery
    wrapper for lua
    FT232RL变砖之后
    12.04 redmine
    Webpack 概念
    如何学习 Webpack
    React基础篇
    Intellij实用技巧
    一行代码搞定图片缩放、旋转、加水印
  • 原文地址:https://www.cnblogs.com/perock/p/2376546.html
Copyright © 2011-2022 走看看