コード例 #1
0
        void SelectWin32Software(AssetComputerData acd, int AID)
        {
            System.Collections.Generic.List <AssetComputerSoftwareData> l = new System.Collections.Generic.List <AssetComputerSoftwareData>();
            DataSet ds = Select("select * from Win32_RegisteredPackage where AID=" + AID);

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                AssetComputerSoftwareData d = new AssetComputerSoftwareData()
                {
                    SoftwareName      = r["RegisteredName"].ToString(),
                    SoftwarePublisher = r["Creator"].ToString(),
                    SoftwareVersion   = r["Version"].ToString()
                };
                l.Add(d);
            }
            acd.Softwares = l.ToArray();
        }
コード例 #2
0
ファイル: AssetComputers.cs プロジェクト: evgeniynet/APIBeta
 static void CopyComputerSoftware(AssetComputerSoftwareData source, lib.bwa.bigWebDesk.LinqBll.Context.AssetComputerSoftwares dest, int DepartmentID, int AssetID)
 {
     dest.AssetId = AssetID;
     dest.DepartmentId = DepartmentID;
     dest.SoftwareName = source.SoftwareName;
     dest.SoftwarePublisher = source.SoftwarePublisher;
     dest.SoftwareVersion = source.SoftwareVersion;
 }
コード例 #3
0
 void SelectWin32Software(AssetComputerData acd, int AID)
 {
     System.Collections.Generic.List<AssetComputerSoftwareData> l = new System.Collections.Generic.List<AssetComputerSoftwareData>();
     DataSet ds = Select("select * from Win32_RegisteredPackage where AID=" + AID);
     foreach (DataRow r in ds.Tables[0].Rows)
     {
         AssetComputerSoftwareData d = new AssetComputerSoftwareData()
         {
             SoftwareName = r["RegisteredName"].ToString(),
             SoftwarePublisher = r["Creator"].ToString(),
             SoftwareVersion = r["Version"].ToString()
         };
         l.Add(d);
     }
     acd.Softwares = l.ToArray();
 }