예제 #1
0
        /// <summary>
        /// 将OldFolder文件夹下的modelObjects剪切到NewFolder文件夹下。
        /// 如果OldFolder=null,则是将modelObjects复制到NewFolder文件夹下。
        /// </summary>
        /// <param name="NewFolder">新文件夹</param>
        /// <param name="OldFolder">旧文件夹,可以等于null</param>
        /// <param name="modelObjects">移动的内容</param>
        public void MoveFile(Teamcenter.Soa.Client.Model.Strong.Folder NewFolder
                             , Teamcenter.Soa.Client.Model.Strong.Folder OldFolder
                             , ModelObject[] modelObjects)
        {
            DataManagementService dmService = DataManagementService.getService(Session.getConnection());
            var mtf = new Teamcenter.Services.Strong.Core._2007_01.DataManagement.MoveToNewFolderInfo();

            mtf.NewFolder     = NewFolder;
            mtf.ObjectsToMove = modelObjects;
            mtf.OldFolder     = OldFolder;
            dmService.MoveToNewFolder(new Teamcenter.Services.Strong.Core._2007_01.DataManagement.MoveToNewFolderInfo[] { mtf });
        }