zoukankan      html  css  js  c++  java
  • 获取当前用户所属的所有仓位,DictRelation,

    //获取当前用户所属的所有仓位  表:WMSLocation
    public client static void lookupWMSLocationIdbyUser(FormStringControl   _ctrl,inventLocationId _inventLocationId )

    {

        SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tablenum(WMSLocation), _ctrl);

        Query                   query;

        QueryBuildDataSource    queryBuildDataSource;

        QueryBuildDataSource    qbdsAuth;

        QueryBuildRange         queryBuildRange;

        QueryBuildRange         qbrUser;

        DictRelation            dr;

        ;

        query = new Query();

        queryBuildDataSource = query.addDataSource(tablenum(WMSLocation));

        qbdsAuth = queryBuildDataSource.addDataSource(tablenum(ACT_LocationOwnerAuth));

        dr = new DictRelation(tablenum(ACT_LocationOwnerAuth));

        dr.loadFieldRelation(fieldnum(ACT_LocationOwnerAuth, InventLocationId));

        dr.loadFieldRelation(fieldnum(ACT_LocationOwnerAuth, WMSLocationId));

        qbdsAuth.addRelation(dr);

        queryBuildRange = queryBuildDataSource.addRange(fieldnum(WMSLocation, InventLocationId));

        qbrUser = qbdsAuth.addRange(fieldnum(ACT_LocationOwnerAuth, UserId));

        queryBuildRange.value(queryValue(_inventLocationId));

       

        queryBuildDataSource.addRange(fieldnum(WMSLocation, ACT_Status)).value(sysQuery::value(ACT_Status::InUse));

       

        qbrUser.value(queryValue(curuserid()));

        sysTableLookup.parmQuery(query);

        sysTableLookup.addLookupfield(fieldnum(WMSLocation, wMSLocationId));

        sysTableLookup.addLookupfield(fieldnum(WMSLocation, InventLocationId));

       

        sysTableLookup.addLookupfield(fieldnum(WMSLocation,Name));

        sysTableLookup.addLookupfield(fieldnum(WMSLocation,CNName));

       

        sysTableLookup.addLookupfield(fieldnum(WMSLocation, LocationType));

        sysTableLookup.addLookupfield(fieldnum(WMSLocation, StoreAreaId));

        sysTableLookup.performFormLookup();

    }

  • 相关阅读:
    VS2015安装水晶报表
    C# 通过java生成的RSA公钥加密和解密
    T4代码生成器
    产品开发- DFX
    读《31天学会CRM项目开发》记录3
    读《31天学会CRM项目开发》记录2
    读《31天学会CRM项目开发》记录1
    产品开发
    产品开发
    机器视觉
  • 原文地址:https://www.cnblogs.com/perock/p/2349520.html
Copyright © 2011-2022 走看看