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;
    }

  • 相关阅读:
    winfrom 对话框
    容器控件
    简单记事本整理
    公共控件
    winfrom。布局
    ado 小测试
    ado.not--更改精简练习
    ado.not--数据库防字符串注入攻击学习及 练习
    ado.not--练习题
    ado.not--添加练习题
  • 原文地址:https://www.cnblogs.com/perock/p/2376546.html
Copyright © 2011-2022 走看看