• 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();
                
            }
        }
    }
  • 相关阅读:
    H 指数 II(leetcode)
    找两个和为目标值且不重叠的子数组(leetcode)
    冗余链接
    那就别担心了 (30分) PTA
    排座位(newcoder)
    倒水(newcoder)
    文献随笔目录03
    基于ASP.NET的高校教学质量监控系统研究随笔
    基于ASP.NET技术的马铃薯专家系统的构建随笔
    高校贫困生评定管理系统设计随笔
  • 原文地址:https://www.cnblogs.com/rumenren/p/5320105.html
Copyright © 2020-2023  润新知