void SelectWin32LocicalDrive(AssetComputerData acd, int AID)
        {
            System.Collections.Generic.List <AssetComputerLogicalDriveData> l = new System.Collections.Generic.List <AssetComputerLogicalDriveData>();
            DataSet ds = Select("select * from Win32_LogicalDisk where AID=" + AID);

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                AssetComputerLogicalDriveData d = new AssetComputerLogicalDriveData()
                {
                    DeviceID     = r["DeviceID"].ToString(),
                    FileSystem   = r["FileSystem"].ToString(),
                    SizeGB       = GetValue(r["Size"], Gb),
                    FreeSpaceGB  = GetValue(r["FreeSpace"], Gb),
                    Description  = r["Description"].ToString(),
                    VolumeName   = r["VolumeName"].ToString(),
                    VolumeSerial = r["VolumeSerialNumber"].ToString(),
                    Compressed   = GetBool(r["Compressed"]),
                    DriveType    = r["DriveType"].ToString()
                };
                l.Add(d);
            }
            acd.LogicalDrives = l.ToArray();
        }
Exemple #2
0
 static void CopyComputerLogicalDrives(AssetComputerLogicalDriveData source, lib.bwa.bigWebDesk.LinqBll.Context.AssetComputerLogicalDrives dest, int DepartmentID, int AsetId)
 {
     dest.AssetId = AsetId;
     dest.Compressed = source.Compressed;
     dest.DepartmentId = DepartmentID;
     dest.Description = source.Description;
     dest.DeviceID = source.DeviceID;
     dest.DriveType = source.DriveType;
     dest.FileSystem = source.FileSystem;
     dest.FreeSpaceGB = source.FreeSpaceGB;
     dest.SizeGB = source.SizeGB;
     dest.VolumeName = source.VolumeName;
     dest.VolumeSerial = source.VolumeSerial;
 }
 void SelectWin32LocicalDrive(AssetComputerData acd, int AID)
 {
     System.Collections.Generic.List<AssetComputerLogicalDriveData> l = new System.Collections.Generic.List<AssetComputerLogicalDriveData>();
     DataSet ds = Select("select * from Win32_LogicalDisk where AID=" + AID);
     foreach (DataRow r in ds.Tables[0].Rows)
     {
         AssetComputerLogicalDriveData d = new AssetComputerLogicalDriveData()
         {
             DeviceID = r["DeviceID"].ToString(),
             FileSystem = r["FileSystem"].ToString(),
             SizeGB = GetValue(r["Size"], Gb),
             FreeSpaceGB = GetValue(r["FreeSpace"], Gb),
             Description = r["Description"].ToString(),
             VolumeName = r["VolumeName"].ToString(),
             VolumeSerial = r["VolumeSerialNumber"].ToString(),
             Compressed = GetBool(r["Compressed"]),
             DriveType = r["DriveType"].ToString()
         };
         l.Add(d);
     }
     acd.LogicalDrives = l.ToArray();
 }