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();
                
            }
        }
    }
  • 相关阅读:
    在Preview中查看man手册
    SVN add file without checkout
    短网址的实现思路
    HTTP 301 与302对于搜索引擎的影响
    解决bitdefender与TortoiseSVN冲突
    在mac中修改主机名
    升级mac os上的maven2至maven3
    访问youtube HTML5测试版本的方法
    Lambda
    107名单。。。
  • 原文地址:https://www.cnblogs.com/rumenren/p/5320105.html
Copyright © 2011-2022 走看看