zoukankan      html  css  js  c++  java
  • Example of Fixed Asset Service Operations

    using System;
    using System.Collections.Generic;
    using System.Text;
    
    namespace AssetFixedAssetTest
    {
        class Test
        {
            static void Main()
            {
                AssetFixedAssetServiceClient client = new AssetFixedAssetServiceClient();
                QueryCriteria queryCriteria = new QueryCriteria();
                AxdFixedAsset axdFA = new AxdFixedAsset();
                EntityKey[] entityKeyList = new EntityKey[1];
    
                //Set up query criteria for find.
                queryCriteria.CriteriaElement = new CriteriaElement[1];
                queryCriteria.CriteriaElement[0] = new CriteriaElement();
                queryCriteria.CriteriaElement[0].DataSourceName = "AssetTable";
                queryCriteria.CriteriaElement[0].FieldName = "AssetId";
                queryCriteria.CriteriaElement[0].Operator = Operator.Equal;
                queryCriteria.CriteriaElement[0].Value1 = "CNC-01";
    
                // Use the 'client' variable to call operations on the service.            
                axdFA = client.find(queryCriteria);
                
                axdFA.AssetTable[0].Name = "Copy of CNC-01";
                axdFA.AssetTable[0].AssetId = null;
    
                //Create a new asset.
                client.create(axdFA);
                
                //Set up entity key.
                entityKeyList[0] = new EntityKey();
                entityKeyList[0].KeyData = new KeyField[1];
                entityKeyList[0].KeyData[0] = new KeyField();
                entityKeyList[0].KeyData[0].Field = "AssetId";
                entityKeyList[0].KeyData[0].Value = "CNC-01";            
    
                //Update the Name field.            
                axdFA = client.find(queryCriteria);
                axdFA.AssetTable[0].Name = "Updated Name";
                client.update(entityKeyList, axdFA);                       
    
                // Always close the client.       
                client.Close();
                
            }
        }
    }
  • 相关阅读:
    Node中js获取异步操作的结果
    阿里云服务器(一)——Nodejs环境配置
    Nodejs之路(二)—— Nodejs再入门
    通过IDEA制作包含Java应程序的Docker镜像
    IDEA远程调试Tomcat程序
    思维导图_脑图
    gitlab userguide
    如何渲染MARKDOWN与MATHJAX
    markdown emoji表情包
    changing-a-remote-s-url
  • 原文地址:https://www.cnblogs.com/rumenren/p/5320105.html
Copyright © 2011-2022 走看看