Changed data managers to use field names

This commit is contained in:
Michael J. Seiferling
2015-11-24 14:20:07 -06:00
parent 2617852d77
commit 254bcbbab5
6 changed files with 112 additions and 112 deletions
+5 -5
View File
@@ -92,8 +92,8 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oTag = New clsTag oTag = New clsTag
oTag.ID = CStr(dr(0)) oTag.ID = CStr(dr("TagID"))
oTag.Name = CStr(dr(1)) oTag.Name = CStr(dr("Name"))
hshList.Add(oTag.Name, oTag) hshList.Add(oTag.Name, oTag)
Next Next
@@ -116,7 +116,7 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oTag = New Tag oTag = New Tag
oTag.Name = CStr(dr(1)) oTag.Name = CStr(dr("Name"))
oList.Add(oTag) oList.Add(oTag)
Next Next
@@ -168,8 +168,8 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oGameTag = New clsGameTag oGameTag = New clsGameTag
oGameTag.TagID = CStr(dr(0)) oGameTag.TagID = CStr(dr("TagID"))
oGameTag.MonitorID = CStr(dr(1)) oGameTag.MonitorID = CStr(dr("MonitorID"))
sCompoundKey = oGameTag.TagID & ":" & oGameTag.MonitorID sCompoundKey = oGameTag.TagID & ":" & oGameTag.MonitorID
hshList.Add(sCompoundKey, oGameTag) hshList.Add(sCompoundKey, oGameTag)
Next Next
+16 -16
View File
@@ -14,14 +14,14 @@ Public Class mgrManifest
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oBackupItem = New clsBackup oBackupItem = New clsBackup
oBackupItem.ID = CStr(dr(0)) oBackupItem.ID = CStr(dr("ManifestID"))
oBackupItem.Name = CStr(dr(1)) oBackupItem.Name = CStr(dr("Name"))
oBackupItem.FileName = CStr(dr(2)) oBackupItem.FileName = CStr(dr("FileName"))
oBackupItem.RestorePath = CStr(dr(3)) oBackupItem.RestorePath = CStr(dr("RestorePath"))
oBackupItem.AbsolutePath = CBool(dr(4)) oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr(5)) oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
oBackupItem.UpdatedBy = CStr(dr(6)) oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr(7)) If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
slList.Add(oBackupItem.Name, oBackupItem) slList.Add(oBackupItem.Name, oBackupItem)
Next Next
@@ -66,14 +66,14 @@ Public Class mgrManifest
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oBackupItem = New clsBackup oBackupItem = New clsBackup
oBackupItem.ID = CStr(dr(0)) oBackupItem.ID = CStr(dr("ManifestID"))
oBackupItem.Name = CStr(dr(1)) oBackupItem.Name = CStr(dr("Name"))
oBackupItem.FileName = CStr(dr(2)) oBackupItem.FileName = CStr(dr("FileName"))
oBackupItem.RestorePath = CStr(dr(3)) oBackupItem.RestorePath = CStr(dr("RestorePath"))
oBackupItem.AbsolutePath = CBool(dr(4)) oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr(5)) oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
oBackupItem.UpdatedBy = CStr(dr(6)) oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr(7)) If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
Next Next
Return oBackupItem Return oBackupItem
+64 -64
View File
@@ -303,22 +303,22 @@ Public Class mgrMonitorList
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oGame = New clsGame oGame = New clsGame
oGame.ID = CStr(dr(0)) oGame.ID = CStr(dr("MonitorID"))
oGame.Name = CStr(dr(1)) oGame.Name = CStr(dr("Name"))
oGame.ProcessName = CStr(dr(2)) oGame.ProcessName = CStr(dr("Process"))
If Not IsDBNull(dr(3)) Then oGame.Path = CStr(dr(3)) If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
oGame.AbsolutePath = CBool(dr(4)) oGame.AbsolutePath = CBool(dr("AbsolutePath"))
oGame.FolderSave = CBool(dr(5)) oGame.FolderSave = CBool(dr("FolderSave"))
If Not IsDBNull(dr(6)) Then oGame.FileType = CStr(dr(6)) If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
oGame.AppendTimeStamp = CBool(dr(7)) oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
If Not IsDBNull(dr(8)) Then oGame.ExcludeList = CStr(dr(8)) If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
If Not IsDBNull(dr(9)) Then oGame.ProcessPath = CStr(dr(9)) If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
If Not IsDBNull(dr(10)) Then oGame.Icon = CStr(dr(10)) If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
oGame.Hours = CDbl(dr(11)) oGame.Hours = CDbl(dr("Hours"))
If Not IsDBNull(dr(12)) Then oGame.Version = CStr(dr(12)) If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
If Not IsDBNull(dr(13)) Then oGame.Company = CStr(dr(13)) If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
oGame.Enabled = CBool(dr(14)) oGame.Enabled = CBool(dr("Enabled"))
oGame.MonitorOnly = CBool(dr(15)) oGame.MonitorOnly = CBool(dr("MonitorOnly"))
hshList.Add(oGame.ID, oGame) hshList.Add(oGame.ID, oGame)
Next Next
@@ -340,22 +340,22 @@ Public Class mgrMonitorList
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oGame = New clsGame oGame = New clsGame
oGame.ID = CStr(dr(0)) oGame.ID = CStr(dr("MonitorID"))
oGame.Name = CStr(dr(1)) oGame.Name = CStr(dr("Name"))
oGame.ProcessName = CStr(dr(2)) oGame.ProcessName = CStr(dr("Process"))
If Not IsDBNull(dr(3)) Then oGame.Path = CStr(dr(3)) If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
oGame.AbsolutePath = CBool(dr(4)) oGame.AbsolutePath = CBool(dr("AbsolutePath"))
oGame.FolderSave = CBool(dr(5)) oGame.FolderSave = CBool(dr("FolderSave"))
If Not IsDBNull(dr(6)) Then oGame.FileType = CStr(dr(6)) If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
oGame.AppendTimeStamp = CBool(dr(7)) oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
If Not IsDBNull(dr(8)) Then oGame.ExcludeList = CStr(dr(8)) If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
If Not IsDBNull(dr(9)) Then oGame.ProcessPath = CStr(dr(9)) If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
If Not IsDBNull(dr(10)) Then oGame.Icon = CStr(dr(10)) If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
oGame.Hours = CDbl(dr(11)) oGame.Hours = CDbl(dr("Hours"))
If Not IsDBNull(dr(12)) Then oGame.Version = CStr(dr(12)) If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
If Not IsDBNull(dr(13)) Then oGame.Company = CStr(dr(13)) If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
oGame.Enabled = CBool(dr(14)) oGame.Enabled = CBool(dr("Enabled"))
oGame.MonitorOnly = CBool(dr(15)) oGame.MonitorOnly = CBool(dr("MonitorOnly"))
Select Case eListType Select Case eListType
Case eListTypes.FullList Case eListTypes.FullList
@@ -599,22 +599,22 @@ Public Class mgrMonitorList
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oGame = New clsGame oGame = New clsGame
oGame.ID = CStr(dr(0)) oGame.ID = CStr(dr("MonitorID"))
oGame.Name = CStr(dr(1)) oGame.Name = CStr(dr("Name"))
oGame.ProcessName = CStr(dr(2)) oGame.ProcessName = CStr(dr("Process"))
If Not IsDBNull(dr(3)) Then oGame.Path = CStr(dr(3)) If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
oGame.AbsolutePath = CBool(dr(4)) oGame.AbsolutePath = CBool(dr("AbsolutePath"))
oGame.FolderSave = CBool(dr(5)) oGame.FolderSave = CBool(dr("FolderSave"))
If Not IsDBNull(dr(6)) Then oGame.FileType = CStr(dr(6)) If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
oGame.AppendTimeStamp = CBool(dr(7)) oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
If Not IsDBNull(dr(8)) Then oGame.ExcludeList = CStr(dr(8)) If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
If Not IsDBNull(dr(9)) Then oGame.ProcessPath = CStr(dr(9)) If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
If Not IsDBNull(dr(10)) Then oGame.Icon = CStr(dr(10)) If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
oGame.Hours = CDbl(dr(11)) oGame.Hours = CDbl(dr("Hours"))
If Not IsDBNull(dr(12)) Then oGame.Version = CStr(dr(12)) If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
If Not IsDBNull(dr(13)) Then oGame.Company = CStr(dr(13)) If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
oGame.Enabled = CBool(dr(14)) oGame.Enabled = CBool(dr("Enabled"))
oGame.MonitorOnly = CBool(dr(15)) oGame.MonitorOnly = CBool(dr("MonitorOnly"))
Next Next
Return oGame Return oGame
@@ -638,22 +638,22 @@ Public Class mgrMonitorList
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oGame = New clsGame oGame = New clsGame
oGame.ID = CStr(dr(0)) oGame.ID = CStr(dr("MonitorID"))
oGame.Name = CStr(dr(1)) oGame.Name = CStr(dr("Name"))
oGame.ProcessName = CStr(dr(2)) oGame.ProcessName = CStr(dr("Process"))
If Not IsDBNull(dr(3)) Then oGame.Path = CStr(dr(3)) If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
oGame.AbsolutePath = CBool(dr(4)) oGame.AbsolutePath = CBool(dr("AbsolutePath"))
oGame.FolderSave = CBool(dr(5)) oGame.FolderSave = CBool(dr("FolderSave"))
If Not IsDBNull(dr(6)) Then oGame.FileType = CStr(dr(6)) If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
oGame.AppendTimeStamp = CBool(dr(7)) oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
If Not IsDBNull(dr(8)) Then oGame.ExcludeList = CStr(dr(8)) If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
If Not IsDBNull(dr(9)) Then oGame.ProcessPath = CStr(dr(9)) If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
If Not IsDBNull(dr(10)) Then oGame.Icon = CStr(dr(10)) If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
oGame.Hours = CDbl(dr(11)) oGame.Hours = CDbl(dr("Hours"))
If Not IsDBNull(dr(12)) Then oGame.Version = CStr(dr(12)) If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
If Not IsDBNull(dr(13)) Then oGame.Company = CStr(dr(13)) If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
oGame.Enabled = CBool(dr(14)) oGame.Enabled = CBool(dr("Enabled"))
oGame.MonitorOnly = CBool(dr(15)) oGame.MonitorOnly = CBool(dr("MonitorOnly"))
hshGames.Add(iCounter, oGame) hshGames.Add(iCounter, oGame)
iCounter += 1 iCounter += 1
Next Next
+12 -12
View File
@@ -160,18 +160,18 @@ Public Class mgrSettings
oData = oDatabase.ReadParamData(sSQL, New Hashtable) oData = oDatabase.ReadParamData(sSQL, New Hashtable)
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
MonitorOnStartup = CBool(dr(1)) MonitorOnStartup = CBool(dr("MonitorOnStartup"))
StartToTray = CBool(dr(2)) StartToTray = CBool(dr("StartToTray"))
ShowDetectionToolTips = CBool(dr(3)) ShowDetectionToolTips = CBool(dr("ShowDetectionToolTips"))
DisableConfirmation = CBool(dr(4)) DisableConfirmation = CBool(dr("DisableConfirmation"))
CreateSubFolder = CBool(dr(5)) CreateSubFolder = CBool(dr("CreateSubFolder"))
ShowOverwriteWarning = CBool(dr(6)) ShowOverwriteWarning = CBool(dr("ShowOverwriteWarning"))
RestoreOnLaunch = CBool(dr(7)) RestoreOnLaunch = CBool(dr("RestoreOnLaunch"))
BackupFolder = CStr(dr(8)) BackupFolder = CStr(dr("BackupFolder"))
Sync = CBool(dr(9)) Sync = CBool(dr("Sync"))
CheckSum = CBool(dr(10)) CheckSum = CBool(dr("CheckSum"))
StartWithWindows = CBool(dr(11)) StartWithWindows = CBool(dr("StartWithWindows"))
TimeTracking = CBool(dr(12)) TimeTracking = CBool(dr("TimeTracking"))
Next Next
oDatabase.Disconnect() oDatabase.Disconnect()
+6 -6
View File
@@ -58,8 +58,8 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oTag = New clsTag oTag = New clsTag
oTag.ID = CStr(dr(0)) oTag.ID = CStr(dr("TagID"))
oTag.Name = CStr(dr(1)) oTag.Name = CStr(dr("Name"))
Next Next
Return oTag Return oTag
@@ -81,8 +81,8 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oTag = New clsTag oTag = New clsTag
oTag.ID = CStr(dr(0)) oTag.ID = CStr(dr("TagID"))
oTag.Name = CStr(dr(1)) oTag.Name = CStr(dr("Name"))
Next Next
Return oTag Return oTag
@@ -125,8 +125,8 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oTag = New clsTag oTag = New clsTag
oTag.ID = CStr(dr(0)) oTag.ID = CStr(dr("TagID"))
oTag.Name = CStr(dr(1)) oTag.Name = CStr(dr("Name"))
hshList.Add(oTag.Name, oTag) hshList.Add(oTag.Name, oTag)
Next Next
+9 -9
View File
@@ -70,9 +70,9 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oCustomVariable = New clsPathVariable oCustomVariable = New clsPathVariable
oCustomVariable.ID = CStr(dr(0)) oCustomVariable.ID = CStr(dr("VariableID"))
oCustomVariable.Name = CStr(dr(1)) oCustomVariable.Name = CStr(dr("Name"))
oCustomVariable.Path = CStr(dr(2)) oCustomVariable.Path = CStr(dr("Path"))
Next Next
Return oCustomVariable Return oCustomVariable
@@ -94,9 +94,9 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oCustomVariable = New clsPathVariable oCustomVariable = New clsPathVariable
oCustomVariable.ID = CStr(dr(0)) oCustomVariable.ID = CStr(dr("VariableID"))
oCustomVariable.Name = CStr(dr(1)) oCustomVariable.Name = CStr(dr("Name"))
oCustomVariable.Path = CStr(dr(2)) oCustomVariable.Path = CStr(dr("Path"))
Next Next
Return oCustomVariable Return oCustomVariable
@@ -139,9 +139,9 @@
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
oCustomVariable = New clsPathVariable oCustomVariable = New clsPathVariable
oCustomVariable.ID = CStr(dr(0)) oCustomVariable.ID = CStr(dr("VariableID"))
oCustomVariable.Name = CStr(dr(1)) oCustomVariable.Name = CStr(dr("Name"))
oCustomVariable.Path = CStr(dr(2)) oCustomVariable.Path = CStr(dr("Path"))
hshList.Add(oCustomVariable.Name, oCustomVariable) hshList.Add(oCustomVariable.Name, oCustomVariable)
Next Next