Пример #1
0
        void SelectWin32CPU(AssetComputerData acd, int AID)
        {
            System.Collections.Generic.List <AssetComputerProcessorData> l = new System.Collections.Generic.List <AssetComputerProcessorData>();
            DataSet ds = Select("select * from Win32_Processor where AID=" + AID);

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                AssetComputerProcessorData d = new AssetComputerProcessorData()
                {
                    CPUType           = r["Name"].ToString(),
                    CPUSerial         = null,
                    CPUVendor         = r["Manufacturer"].ToString(),
                    CPUSpeedMHz       = GetInt(r["CurrentClockSpeed"]),
                    CPUClass          = r["Version"].ToString(),
                    CurrentClockSpeed = GetInt(r["CurrentClockSpeed"]),
                    UniqueId          = r["UniqueId"].ToString(),
                    Description       = r["Description"].ToString(),
                    Version           = r["Version"].ToString(),
                    L2CachSize        = GetInt(r["L2CacheSize"]),
                    ExtClock          = GetInt(r["ExtClock"]),
                    CurrentVoltage    = GetFloat(r["CurrentVoltage"]),
                    DeviceID          = r["DeviceID"].ToString()
                };
                l.Add(d);
            }
            acd.Processors = l.ToArray();
        }
Пример #2
0
 static void CopyComputerProcessor(AssetComputerProcessorData source, lib.bwa.bigWebDesk.LinqBll.Context.AssetComputerProcessors dest, int DepartmentID, int AssetID)
 {
     dest.AssetId = AssetID;
     dest.CPUClass = source.CPUClass;
     dest.CPUSerial = source.CPUSerial;
     dest.CPUSpeedMHz = source.CPUSpeedMHz;
     dest.CPUType = source.CPUType;
     dest.CPUVendor = source.CPUVendor;
     dest.CurrentClockSpeed = source.CurrentClockSpeed;
     dest.CurrentVoltage = source.CurrentVoltage;
     dest.DepartmentId = DepartmentID;
     dest.Description = source.Description;
     dest.DeviceID = source.DeviceID;
     dest.ExtClock = source.ExtClock;
     dest.L2CachSize = source.L2CachSize;
     dest.UniqueId = source.UniqueId;
     dest.Version = source.Version;
 }
Пример #3
0
 void SelectWin32CPU(AssetComputerData acd, int AID)
 {
     System.Collections.Generic.List<AssetComputerProcessorData> l = new System.Collections.Generic.List<AssetComputerProcessorData>();
     DataSet ds = Select("select * from Win32_Processor where AID=" + AID);
     foreach (DataRow r in ds.Tables[0].Rows)
     {
         AssetComputerProcessorData d = new AssetComputerProcessorData()
         {
             CPUType = r["Name"].ToString(),
             CPUSerial = null,
             CPUVendor = r["Manufacturer"].ToString(),
             CPUSpeedMHz = GetInt(r["CurrentClockSpeed"]),
             CPUClass = r["Version"].ToString(),
             CurrentClockSpeed = GetInt(r["CurrentClockSpeed"]),
             UniqueId = r["UniqueId"].ToString(),
             Description = r["Description"].ToString(),
             Version = r["Version"].ToString(),
             L2CachSize = GetInt(r["L2CacheSize"]),
             ExtClock = GetInt(r["ExtClock"]),
             CurrentVoltage = GetFloat(r["CurrentVoltage"]),
             DeviceID = r["DeviceID"].ToString()
         };
         l.Add(d);
     }
     acd.Processors = l.ToArray();
 }