From: alanrevans Date: Wed, 13 May 2020 18:42:46 +0000 (+0100) Subject: Make DB part of project X-Git-Url: https://fbox.kageds.com/gitweb/NEATEST.git/commitdiff_plain/0db63183acd08a45ae907a2adedf10e4cb7ce09b?ds=inline;hp=f7c7983a5879f2450a792ba5dcbe3009852c7501 Make DB part of project --- diff --git a/NEA/bin/Debug/NEA.accdb b/NEA/NEA.accdb similarity index 96% rename from NEA/bin/Debug/NEA.accdb rename to NEA/NEA.accdb index 5718766..c7048ab 100644 Binary files a/NEA/bin/Debug/NEA.accdb and b/NEA/NEA.accdb differ diff --git a/NEA/NEA.vbproj b/NEA/NEA.vbproj index 04e92bc..636d98c 100644 --- a/NEA/NEA.vbproj +++ b/NEA/NEA.vbproj @@ -242,5 +242,10 @@ True + + + Always + + \ No newline at end of file diff --git a/NEA/NEADataSet.Designer.vb b/NEA/NEADataSet.Designer.vb index e9ba057..aa6cc4f 100644 --- a/NEA/NEADataSet.Designer.vb +++ b/NEA/NEADataSet.Designer.vb @@ -39,11 +39,11 @@ Partial Public Class NEADataSet Private tableTags As TagsDataTable - Private tableWishlist As WishlistDataTable + Private tableUser_Details As User_DetailsDataTable Private tableUsers As UsersDataTable - Private tableUser_Details As User_DetailsDataTable + Private tableWishlist As WishlistDataTable Private relationGamesAchievement As Global.System.Data.DataRelation @@ -53,10 +53,10 @@ Partial Public Class NEADataSet Private relationGamesReviews As Global.System.Data.DataRelation - Private relationGamesWishlist As Global.System.Data.DataRelation - Private relationUser_DetailsUsers As Global.System.Data.DataRelation + Private relationGamesWishlist As Global.System.Data.DataRelation + Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema _ - Public ReadOnly Property Wishlist() As WishlistDataTable + Public ReadOnly Property User_Details() As User_DetailsDataTable Get - Return Me.tableWishlist + Return Me.tableUser_Details End Get End Property @@ -227,9 +227,9 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ - Public ReadOnly Property User_Details() As User_DetailsDataTable + Public ReadOnly Property Wishlist() As WishlistDataTable Get - Return Me.tableUser_Details + Return Me.tableWishlist End Get End Property @@ -321,14 +321,14 @@ Partial Public Class NEADataSet If (Not (ds.Tables("Tags")) Is Nothing) Then MyBase.Tables.Add(New TagsDataTable(ds.Tables("Tags"))) End If - If (Not (ds.Tables("Wishlist")) Is Nothing) Then - MyBase.Tables.Add(New WishlistDataTable(ds.Tables("Wishlist"))) + If (Not (ds.Tables("User_Details")) Is Nothing) Then + MyBase.Tables.Add(New User_DetailsDataTable(ds.Tables("User_Details"))) End If If (Not (ds.Tables("Users")) Is Nothing) Then MyBase.Tables.Add(New UsersDataTable(ds.Tables("Users"))) End If - If (Not (ds.Tables("User_Details")) Is Nothing) Then - MyBase.Tables.Add(New User_DetailsDataTable(ds.Tables("User_Details"))) + If (Not (ds.Tables("Wishlist")) Is Nothing) Then + MyBase.Tables.Add(New WishlistDataTable(ds.Tables("Wishlist"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix @@ -404,10 +404,10 @@ Partial Public Class NEADataSet Me.tableTags.InitVars End If End If - Me.tableWishlist = CType(MyBase.Tables("Wishlist"),WishlistDataTable) + Me.tableUser_Details = CType(MyBase.Tables("User_Details"),User_DetailsDataTable) If (initTable = true) Then - If (Not (Me.tableWishlist) Is Nothing) Then - Me.tableWishlist.InitVars + If (Not (Me.tableUser_Details) Is Nothing) Then + Me.tableUser_Details.InitVars End If End If Me.tableUsers = CType(MyBase.Tables("Users"),UsersDataTable) @@ -416,18 +416,18 @@ Partial Public Class NEADataSet Me.tableUsers.InitVars End If End If - Me.tableUser_Details = CType(MyBase.Tables("User_Details"),User_DetailsDataTable) + Me.tableWishlist = CType(MyBase.Tables("Wishlist"),WishlistDataTable) If (initTable = true) Then - If (Not (Me.tableUser_Details) Is Nothing) Then - Me.tableUser_Details.InitVars + If (Not (Me.tableWishlist) Is Nothing) Then + Me.tableWishlist.InitVars End If End If Me.relationGamesAchievement = Me.Relations("GamesAchievement") Me.relationGamesDOW = Me.Relations("GamesDOW") Me.relationGamesPurchased = Me.Relations("GamesPurchased") Me.relationGamesReviews = Me.Relations("GamesReviews") - Me.relationGamesWishlist = Me.Relations("GamesWishlist") Me.relationUser_DetailsUsers = Me.Relations("User_DetailsUsers") + Me.relationGamesWishlist = Me.Relations("GamesWishlist") End Sub _ - Private Function ShouldSerializeWishlist() As Boolean + Private Function ShouldSerializeUser_Details() As Boolean Return false End Function @@ -528,7 +528,7 @@ Partial Public Class NEADataSet _ - Private Function ShouldSerializeUser_Details() As Boolean + Private Function ShouldSerializeWishlist() As Boolean Return false End Function @@ -612,13 +612,13 @@ Partial Public Class NEADataSet Public Delegate Sub TagsRowChangeEventHandler(ByVal sender As Object, ByVal e As TagsRowChangeEvent) _ - Public Delegate Sub WishlistRowChangeEventHandler(ByVal sender As Object, ByVal e As WishlistRowChangeEvent) + Public Delegate Sub User_DetailsRowChangeEventHandler(ByVal sender As Object, ByVal e As User_DetailsRowChangeEvent) _ Public Delegate Sub UsersRowChangeEventHandler(ByVal sender As Object, ByVal e As UsersRowChangeEvent) _ - Public Delegate Sub User_DetailsRowChangeEventHandler(ByVal sender As Object, ByVal e As User_DetailsRowChangeEvent) + Public Delegate Sub WishlistRowChangeEventHandler(ByVal sender As Object, ByVal e As WishlistRowChangeEvent) ''' '''Represents the strongly named DataTable class. @@ -2824,20 +2824,36 @@ Partial Public Class NEADataSet ''' _ - Partial Public Class WishlistDataTable - Inherits Global.System.Data.TypedTableBase(Of WishlistRow) + Partial Public Class User_DetailsDataTable + Inherits Global.System.Data.TypedTableBase(Of User_DetailsRow) - Private columnWishlistID As Global.System.Data.DataColumn + Private columnUserDetailsID As Global.System.Data.DataColumn - Private columnUserID As Global.System.Data.DataColumn + Private columnFirstName As Global.System.Data.DataColumn - Private columnGameID As Global.System.Data.DataColumn + Private columnLastName As Global.System.Data.DataColumn + + Private columnAddressLine1 As Global.System.Data.DataColumn + + Private columnTown As Global.System.Data.DataColumn + + Private columnPostcode As Global.System.Data.DataColumn + + Private columnCardNumber As Global.System.Data.DataColumn + + Private columnCVC As Global.System.Data.DataColumn + + Private columnIGN As Global.System.Data.DataColumn + + Private columnEmail As Global.System.Data.DataColumn + + Private columnProfilePic As Global.System.Data.DataColumn _ Public Sub New() MyBase.New - Me.TableName = "Wishlist" + Me.TableName = "User_Details" Me.BeginInit Me.InitClass Me.EndInit @@ -2870,25 +2886,89 @@ Partial Public Class NEADataSet _ - Public ReadOnly Property WishlistIDColumn() As Global.System.Data.DataColumn + Public ReadOnly Property UserDetailsIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnWishlistID + Return Me.columnUserDetailsID End Get End Property _ - Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn + Public ReadOnly Property FirstNameColumn() As Global.System.Data.DataColumn Get - Return Me.columnUserID + Return Me.columnFirstName End Get End Property _ - Public ReadOnly Property GameIDColumn() As Global.System.Data.DataColumn + Public ReadOnly Property LastNameColumn() As Global.System.Data.DataColumn Get - Return Me.columnGameID + Return Me.columnLastName + End Get + End Property + + _ + Public ReadOnly Property AddressLine1Column() As Global.System.Data.DataColumn + Get + Return Me.columnAddressLine1 + End Get + End Property + + _ + Public ReadOnly Property TownColumn() As Global.System.Data.DataColumn + Get + Return Me.columnTown + End Get + End Property + + _ + Public ReadOnly Property PostcodeColumn() As Global.System.Data.DataColumn + Get + Return Me.columnPostcode + End Get + End Property + + _ + Public ReadOnly Property CardNumberColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCardNumber + End Get + End Property + + _ + Public ReadOnly Property CVCColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCVC + End Get + End Property + + _ + Public ReadOnly Property IGNColumn() As Global.System.Data.DataColumn + Get + Return Me.columnIGN + End Get + End Property + + _ + Public ReadOnly Property EmailColumn() As Global.System.Data.DataColumn + Get + Return Me.columnEmail + End Get + End Property + + _ + Public ReadOnly Property ProfilePicColumn() As Global.System.Data.DataColumn + Get + Return Me.columnProfilePic End Get End Property @@ -2903,53 +2983,50 @@ Partial Public Class NEADataSet _ - Public Default ReadOnly Property Item(ByVal index As Integer) As WishlistRow + Public Default ReadOnly Property Item(ByVal index As Integer) As User_DetailsRow Get - Return CType(Me.Rows(index),WishlistRow) + Return CType(Me.Rows(index),User_DetailsRow) End Get End Property _ - Public Event WishlistRowChanging As WishlistRowChangeEventHandler + Public Event User_DetailsRowChanging As User_DetailsRowChangeEventHandler _ - Public Event WishlistRowChanged As WishlistRowChangeEventHandler + Public Event User_DetailsRowChanged As User_DetailsRowChangeEventHandler _ - Public Event WishlistRowDeleting As WishlistRowChangeEventHandler + Public Event User_DetailsRowDeleting As User_DetailsRowChangeEventHandler _ - Public Event WishlistRowDeleted As WishlistRowChangeEventHandler + Public Event User_DetailsRowDeleted As User_DetailsRowChangeEventHandler _ - Public Overloads Sub AddWishlistRow(ByVal row As WishlistRow) + Public Overloads Sub AddUser_DetailsRow(ByVal row As User_DetailsRow) Me.Rows.Add(row) End Sub _ - Public Overloads Function AddWishlistRow(ByVal UserID As Integer, ByVal parentGamesRowByGamesWishlist As GamesRow) As WishlistRow - Dim rowWishlistRow As WishlistRow = CType(Me.NewRow,WishlistRow) - Dim columnValuesArray() As Object = New Object() {Nothing, UserID, Nothing} - If (Not (parentGamesRowByGamesWishlist) Is Nothing) Then - columnValuesArray(2) = parentGamesRowByGamesWishlist(0) - End If - rowWishlistRow.ItemArray = columnValuesArray - Me.Rows.Add(rowWishlistRow) - Return rowWishlistRow + Public Overloads Function AddUser_DetailsRow(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Integer, ByVal CVC As Integer, ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte) As User_DetailsRow + Dim rowUser_DetailsRow As User_DetailsRow = CType(Me.NewRow,User_DetailsRow) + Dim columnValuesArray() As Object = New Object() {Nothing, FirstName, LastName, AddressLine1, Town, Postcode, CardNumber, CVC, IGN, Email, ProfilePic} + rowUser_DetailsRow.ItemArray = columnValuesArray + Me.Rows.Add(rowUser_DetailsRow) + Return rowUser_DetailsRow End Function _ - Public Function FindByWishlistID(ByVal WishlistID As Integer) As WishlistRow - Return CType(Me.Rows.Find(New Object() {WishlistID}),WishlistRow) + Public Function FindByUserDetailsID(ByVal UserDetailsID As Integer) As User_DetailsRow + Return CType(Me.Rows.Find(New Object() {UserDetailsID}),User_DetailsRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable - Dim cln As WishlistDataTable = CType(MyBase.Clone,WishlistDataTable) + Dim cln As User_DetailsDataTable = CType(MyBase.Clone,User_DetailsDataTable) cln.InitVars Return cln End Function @@ -2957,58 +3034,89 @@ Partial Public Class NEADataSet _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable - Return New WishlistDataTable() + Return New User_DetailsDataTable() End Function _ Friend Sub InitVars() - Me.columnWishlistID = MyBase.Columns("WishlistID") - Me.columnUserID = MyBase.Columns("UserID") - Me.columnGameID = MyBase.Columns("GameID") + Me.columnUserDetailsID = MyBase.Columns("UserDetailsID") + Me.columnFirstName = MyBase.Columns("FirstName") + Me.columnLastName = MyBase.Columns("LastName") + Me.columnAddressLine1 = MyBase.Columns("AddressLine1") + Me.columnTown = MyBase.Columns("Town") + Me.columnPostcode = MyBase.Columns("Postcode") + Me.columnCardNumber = MyBase.Columns("CardNumber") + Me.columnCVC = MyBase.Columns("CVC") + Me.columnIGN = MyBase.Columns("IGN") + Me.columnEmail = MyBase.Columns("Email") + Me.columnProfilePic = MyBase.Columns("ProfilePic") End Sub _ Private Sub InitClass() - Me.columnWishlistID = New Global.System.Data.DataColumn("WishlistID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnWishlistID) - Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnUserID) - Me.columnGameID = New Global.System.Data.DataColumn("GameID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnGameID) - Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnWishlistID}, true)) - Me.columnWishlistID.AutoIncrement = true - Me.columnWishlistID.AutoIncrementSeed = -1 - Me.columnWishlistID.AutoIncrementStep = -1 - Me.columnWishlistID.AllowDBNull = false - Me.columnWishlistID.Unique = true - End Sub - - _ - Public Function NewWishlistRow() As WishlistRow - Return CType(Me.NewRow,WishlistRow) - End Function - - _ - Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow - Return New WishlistRow(builder) - End Function - - _ - Protected Overrides Function GetRowType() As Global.System.Type - Return GetType(WishlistRow) - End Function - - _ - Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + Me.columnUserDetailsID = New Global.System.Data.DataColumn("UserDetailsID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnUserDetailsID) + Me.columnFirstName = New Global.System.Data.DataColumn("FirstName", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFirstName) + Me.columnLastName = New Global.System.Data.DataColumn("LastName", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnLastName) + Me.columnAddressLine1 = New Global.System.Data.DataColumn("AddressLine1", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnAddressLine1) + Me.columnTown = New Global.System.Data.DataColumn("Town", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnTown) + Me.columnPostcode = New Global.System.Data.DataColumn("Postcode", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnPostcode) + Me.columnCardNumber = New Global.System.Data.DataColumn("CardNumber", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCardNumber) + Me.columnCVC = New Global.System.Data.DataColumn("CVC", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCVC) + Me.columnIGN = New Global.System.Data.DataColumn("IGN", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnIGN) + Me.columnEmail = New Global.System.Data.DataColumn("Email", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnEmail) + Me.columnProfilePic = New Global.System.Data.DataColumn("ProfilePic", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnProfilePic) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnUserDetailsID}, true)) + Me.columnUserDetailsID.AutoIncrement = true + Me.columnUserDetailsID.AutoIncrementSeed = -1 + Me.columnUserDetailsID.AutoIncrementStep = -1 + Me.columnUserDetailsID.AllowDBNull = false + Me.columnUserDetailsID.Unique = true + Me.columnFirstName.MaxLength = 536870910 + Me.columnLastName.MaxLength = 536870910 + Me.columnAddressLine1.MaxLength = 536870910 + Me.columnTown.MaxLength = 255 + Me.columnPostcode.MaxLength = 536870910 + Me.columnIGN.MaxLength = 536870910 + Me.columnEmail.MaxLength = 536870910 + End Sub + + _ + Public Function NewUser_DetailsRow() As User_DetailsRow + Return CType(Me.NewRow,User_DetailsRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New User_DetailsRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(User_DetailsRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) - If (Not (Me.WishlistRowChangedEvent) Is Nothing) Then - RaiseEvent WishlistRowChanged(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) + If (Not (Me.User_DetailsRowChangedEvent) Is Nothing) Then + RaiseEvent User_DetailsRowChanged(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) End If End Sub @@ -3016,8 +3124,8 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) - If (Not (Me.WishlistRowChangingEvent) Is Nothing) Then - RaiseEvent WishlistRowChanging(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) + If (Not (Me.User_DetailsRowChangingEvent) Is Nothing) Then + RaiseEvent User_DetailsRowChanging(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) End If End Sub @@ -3025,8 +3133,8 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) - If (Not (Me.WishlistRowDeletedEvent) Is Nothing) Then - RaiseEvent WishlistRowDeleted(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) + If (Not (Me.User_DetailsRowDeletedEvent) Is Nothing) Then + RaiseEvent User_DetailsRowDeleted(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) End If End Sub @@ -3034,14 +3142,14 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) - If (Not (Me.WishlistRowDeletingEvent) Is Nothing) Then - RaiseEvent WishlistRowDeleting(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) + If (Not (Me.User_DetailsRowDeletingEvent) Is Nothing) Then + RaiseEvent User_DetailsRowDeleting(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) End If End Sub _ - Public Sub RemoveWishlistRow(ByVal row As WishlistRow) + Public Sub RemoveUser_DetailsRow(ByVal row As User_DetailsRow) Me.Rows.Remove(row) End Sub @@ -3068,7 +3176,7 @@ Partial Public Class NEADataSet type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" - attribute2.FixedValue = "WishlistDataTable" + attribute2.FixedValue = "User_DetailsDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable @@ -3425,36 +3533,20 @@ Partial Public Class NEADataSet ''' _ - Partial Public Class User_DetailsDataTable - Inherits Global.System.Data.TypedTableBase(Of User_DetailsRow) - - Private columnUserDetailsID As Global.System.Data.DataColumn - - Private columnFirstName As Global.System.Data.DataColumn - - Private columnLastName As Global.System.Data.DataColumn - - Private columnAddressLine1 As Global.System.Data.DataColumn - - Private columnTown As Global.System.Data.DataColumn - - Private columnPostcode As Global.System.Data.DataColumn - - Private columnCardNumber As Global.System.Data.DataColumn - - Private columnCVC As Global.System.Data.DataColumn + Partial Public Class WishlistDataTable + Inherits Global.System.Data.TypedTableBase(Of WishlistRow) - Private columnIGN As Global.System.Data.DataColumn + Private columnWishlistID As Global.System.Data.DataColumn - Private columnEmail As Global.System.Data.DataColumn + Private columnUserID As Global.System.Data.DataColumn - Private columnProfilePic As Global.System.Data.DataColumn + Private columnGameID As Global.System.Data.DataColumn _ Public Sub New() MyBase.New - Me.TableName = "User_Details" + Me.TableName = "Wishlist" Me.BeginInit Me.InitClass Me.EndInit @@ -3487,89 +3579,25 @@ Partial Public Class NEADataSet _ - Public ReadOnly Property UserDetailsIDColumn() As Global.System.Data.DataColumn - Get - Return Me.columnUserDetailsID - End Get - End Property - - _ - Public ReadOnly Property FirstNameColumn() As Global.System.Data.DataColumn - Get - Return Me.columnFirstName - End Get - End Property - - _ - Public ReadOnly Property LastNameColumn() As Global.System.Data.DataColumn - Get - Return Me.columnLastName - End Get - End Property - - _ - Public ReadOnly Property AddressLine1Column() As Global.System.Data.DataColumn - Get - Return Me.columnAddressLine1 - End Get - End Property - - _ - Public ReadOnly Property TownColumn() As Global.System.Data.DataColumn - Get - Return Me.columnTown - End Get - End Property - - _ - Public ReadOnly Property PostcodeColumn() As Global.System.Data.DataColumn - Get - Return Me.columnPostcode - End Get - End Property - - _ - Public ReadOnly Property CardNumberColumn() As Global.System.Data.DataColumn - Get - Return Me.columnCardNumber - End Get - End Property - - _ - Public ReadOnly Property CVCColumn() As Global.System.Data.DataColumn - Get - Return Me.columnCVC - End Get - End Property - - _ - Public ReadOnly Property IGNColumn() As Global.System.Data.DataColumn + Public ReadOnly Property WishlistIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnIGN + Return Me.columnWishlistID End Get End Property _ - Public ReadOnly Property EmailColumn() As Global.System.Data.DataColumn + Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnEmail + Return Me.columnUserID End Get End Property _ - Public ReadOnly Property ProfilePicColumn() As Global.System.Data.DataColumn + Public ReadOnly Property GameIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnProfilePic + Return Me.columnGameID End Get End Property @@ -3584,50 +3612,53 @@ Partial Public Class NEADataSet _ - Public Default ReadOnly Property Item(ByVal index As Integer) As User_DetailsRow + Public Default ReadOnly Property Item(ByVal index As Integer) As WishlistRow Get - Return CType(Me.Rows(index),User_DetailsRow) + Return CType(Me.Rows(index),WishlistRow) End Get End Property _ - Public Event User_DetailsRowChanging As User_DetailsRowChangeEventHandler + Public Event WishlistRowChanging As WishlistRowChangeEventHandler _ - Public Event User_DetailsRowChanged As User_DetailsRowChangeEventHandler + Public Event WishlistRowChanged As WishlistRowChangeEventHandler _ - Public Event User_DetailsRowDeleting As User_DetailsRowChangeEventHandler + Public Event WishlistRowDeleting As WishlistRowChangeEventHandler _ - Public Event User_DetailsRowDeleted As User_DetailsRowChangeEventHandler + Public Event WishlistRowDeleted As WishlistRowChangeEventHandler _ - Public Overloads Sub AddUser_DetailsRow(ByVal row As User_DetailsRow) + Public Overloads Sub AddWishlistRow(ByVal row As WishlistRow) Me.Rows.Add(row) End Sub _ - Public Overloads Function AddUser_DetailsRow(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Integer, ByVal CVC As Integer, ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte) As User_DetailsRow - Dim rowUser_DetailsRow As User_DetailsRow = CType(Me.NewRow,User_DetailsRow) - Dim columnValuesArray() As Object = New Object() {Nothing, FirstName, LastName, AddressLine1, Town, Postcode, CardNumber, CVC, IGN, Email, ProfilePic} - rowUser_DetailsRow.ItemArray = columnValuesArray - Me.Rows.Add(rowUser_DetailsRow) - Return rowUser_DetailsRow + Public Overloads Function AddWishlistRow(ByVal UserID As Integer, ByVal parentGamesRowByGamesWishlist As GamesRow) As WishlistRow + Dim rowWishlistRow As WishlistRow = CType(Me.NewRow,WishlistRow) + Dim columnValuesArray() As Object = New Object() {Nothing, UserID, Nothing} + If (Not (parentGamesRowByGamesWishlist) Is Nothing) Then + columnValuesArray(2) = parentGamesRowByGamesWishlist(0) + End If + rowWishlistRow.ItemArray = columnValuesArray + Me.Rows.Add(rowWishlistRow) + Return rowWishlistRow End Function _ - Public Function FindByUserDetailsID(ByVal UserDetailsID As Integer) As User_DetailsRow - Return CType(Me.Rows.Find(New Object() {UserDetailsID}),User_DetailsRow) + Public Function FindByWishlistID(ByVal WishlistID As Integer) As WishlistRow + Return CType(Me.Rows.Find(New Object() {WishlistID}),WishlistRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable - Dim cln As User_DetailsDataTable = CType(MyBase.Clone,User_DetailsDataTable) + Dim cln As WishlistDataTable = CType(MyBase.Clone,WishlistDataTable) cln.InitVars Return cln End Function @@ -3635,89 +3666,58 @@ Partial Public Class NEADataSet _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable - Return New User_DetailsDataTable() + Return New WishlistDataTable() End Function _ Friend Sub InitVars() - Me.columnUserDetailsID = MyBase.Columns("UserDetailsID") - Me.columnFirstName = MyBase.Columns("FirstName") - Me.columnLastName = MyBase.Columns("LastName") - Me.columnAddressLine1 = MyBase.Columns("AddressLine1") - Me.columnTown = MyBase.Columns("Town") - Me.columnPostcode = MyBase.Columns("Postcode") - Me.columnCardNumber = MyBase.Columns("CardNumber") - Me.columnCVC = MyBase.Columns("CVC") - Me.columnIGN = MyBase.Columns("IGN") - Me.columnEmail = MyBase.Columns("Email") - Me.columnProfilePic = MyBase.Columns("ProfilePic") + Me.columnWishlistID = MyBase.Columns("WishlistID") + Me.columnUserID = MyBase.Columns("UserID") + Me.columnGameID = MyBase.Columns("GameID") End Sub _ Private Sub InitClass() - Me.columnUserDetailsID = New Global.System.Data.DataColumn("UserDetailsID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnUserDetailsID) - Me.columnFirstName = New Global.System.Data.DataColumn("FirstName", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnFirstName) - Me.columnLastName = New Global.System.Data.DataColumn("LastName", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnLastName) - Me.columnAddressLine1 = New Global.System.Data.DataColumn("AddressLine1", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnAddressLine1) - Me.columnTown = New Global.System.Data.DataColumn("Town", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnTown) - Me.columnPostcode = New Global.System.Data.DataColumn("Postcode", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnPostcode) - Me.columnCardNumber = New Global.System.Data.DataColumn("CardNumber", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnCardNumber) - Me.columnCVC = New Global.System.Data.DataColumn("CVC", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnCVC) - Me.columnIGN = New Global.System.Data.DataColumn("IGN", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnIGN) - Me.columnEmail = New Global.System.Data.DataColumn("Email", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnEmail) - Me.columnProfilePic = New Global.System.Data.DataColumn("ProfilePic", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnProfilePic) - Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnUserDetailsID}, true)) - Me.columnUserDetailsID.AutoIncrement = true - Me.columnUserDetailsID.AutoIncrementSeed = -1 - Me.columnUserDetailsID.AutoIncrementStep = -1 - Me.columnUserDetailsID.AllowDBNull = false - Me.columnUserDetailsID.Unique = true - Me.columnFirstName.MaxLength = 536870910 - Me.columnLastName.MaxLength = 536870910 - Me.columnAddressLine1.MaxLength = 536870910 - Me.columnTown.MaxLength = 255 - Me.columnPostcode.MaxLength = 536870910 - Me.columnIGN.MaxLength = 536870910 - Me.columnEmail.MaxLength = 536870910 + Me.columnWishlistID = New Global.System.Data.DataColumn("WishlistID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnWishlistID) + Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnUserID) + Me.columnGameID = New Global.System.Data.DataColumn("GameID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnGameID) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnWishlistID}, true)) + Me.columnWishlistID.AutoIncrement = true + Me.columnWishlistID.AutoIncrementSeed = -1 + Me.columnWishlistID.AutoIncrementStep = -1 + Me.columnWishlistID.AllowDBNull = false + Me.columnWishlistID.Unique = true End Sub _ - Public Function NewUser_DetailsRow() As User_DetailsRow - Return CType(Me.NewRow,User_DetailsRow) + Public Function NewWishlistRow() As WishlistRow + Return CType(Me.NewRow,WishlistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow - Return New User_DetailsRow(builder) + Return New WishlistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type - Return GetType(User_DetailsRow) + Return GetType(WishlistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) - If (Not (Me.User_DetailsRowChangedEvent) Is Nothing) Then - RaiseEvent User_DetailsRowChanged(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) + If (Not (Me.WishlistRowChangedEvent) Is Nothing) Then + RaiseEvent WishlistRowChanged(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) End If End Sub @@ -3725,8 +3725,8 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) - If (Not (Me.User_DetailsRowChangingEvent) Is Nothing) Then - RaiseEvent User_DetailsRowChanging(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) + If (Not (Me.WishlistRowChangingEvent) Is Nothing) Then + RaiseEvent WishlistRowChanging(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) End If End Sub @@ -3734,8 +3734,8 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) - If (Not (Me.User_DetailsRowDeletedEvent) Is Nothing) Then - RaiseEvent User_DetailsRowDeleted(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) + If (Not (Me.WishlistRowDeletedEvent) Is Nothing) Then + RaiseEvent WishlistRowDeleted(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) End If End Sub @@ -3743,14 +3743,14 @@ Partial Public Class NEADataSet Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) - If (Not (Me.User_DetailsRowDeletingEvent) Is Nothing) Then - RaiseEvent User_DetailsRowDeleting(Me, New User_DetailsRowChangeEvent(CType(e.Row,User_DetailsRow), e.Action)) + If (Not (Me.WishlistRowDeletingEvent) Is Nothing) Then + RaiseEvent WishlistRowDeleting(Me, New WishlistRowChangeEvent(CType(e.Row,WishlistRow), e.Action)) End If End Sub _ - Public Sub RemoveUser_DetailsRow(ByVal row As User_DetailsRow) + Public Sub RemoveWishlistRow(ByVal row As WishlistRow) Me.Rows.Remove(row) End Sub @@ -3777,7 +3777,7 @@ Partial Public Class NEADataSet type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" - attribute2.FixedValue = "User_DetailsDataTable" + attribute2.FixedValue = "WishlistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable @@ -4779,217 +4779,6 @@ Partial Public Class NEADataSet End Property End Class - ''' - '''Represents strongly named DataRow class. - ''' - Partial Public Class WishlistRow - Inherits Global.System.Data.DataRow - - Private tableWishlist As WishlistDataTable - - _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableWishlist = CType(Me.Table,WishlistDataTable) - End Sub - - _ - Public Property WishlistID() As Integer - Get - Return CType(Me(Me.tableWishlist.WishlistIDColumn),Integer) - End Get - Set - Me(Me.tableWishlist.WishlistIDColumn) = value - End Set - End Property - - _ - Public Property UserID() As Integer - Get - Try - Return CType(Me(Me.tableWishlist.UserIDColumn),Integer) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'Wishlist' is DBNull.", e) - End Try - End Get - Set - Me(Me.tableWishlist.UserIDColumn) = value - End Set - End Property - - _ - Public Property GameID() As Integer - Get - Try - Return CType(Me(Me.tableWishlist.GameIDColumn),Integer) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("The value for column 'GameID' in table 'Wishlist' is DBNull.", e) - End Try - End Get - Set - Me(Me.tableWishlist.GameIDColumn) = value - End Set - End Property - - _ - Public Property GamesRow() As GamesRow - Get - Return CType(Me.GetParentRow(Me.Table.ParentRelations("GamesWishlist")),GamesRow) - End Get - Set - Me.SetParentRow(value, Me.Table.ParentRelations("GamesWishlist")) - End Set - End Property - - _ - Public Function IsUserIDNull() As Boolean - Return Me.IsNull(Me.tableWishlist.UserIDColumn) - End Function - - _ - Public Sub SetUserIDNull() - Me(Me.tableWishlist.UserIDColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsGameIDNull() As Boolean - Return Me.IsNull(Me.tableWishlist.GameIDColumn) - End Function - - _ - Public Sub SetGameIDNull() - Me(Me.tableWishlist.GameIDColumn) = Global.System.Convert.DBNull - End Sub - End Class - - ''' - '''Represents strongly named DataRow class. - ''' - Partial Public Class UsersRow - Inherits Global.System.Data.DataRow - - Private tableUsers As UsersDataTable - - _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableUsers = CType(Me.Table,UsersDataTable) - End Sub - - _ - Public Property UserID() As Integer - Get - Return CType(Me(Me.tableUsers.UserIDColumn),Integer) - End Get - Set - Me(Me.tableUsers.UserIDColumn) = value - End Set - End Property - - _ - Public Property User_DetailsID() As Integer - Get - Try - Return CType(Me(Me.tableUsers.User_DetailsIDColumn),Integer) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("The value for column 'User_DetailsID' in table 'Users' is DBNull.", e) - End Try - End Get - Set - Me(Me.tableUsers.User_DetailsIDColumn) = value - End Set - End Property - - _ - Public Property Username() As String - Get - Try - Return CType(Me(Me.tableUsers.UsernameColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("The value for column 'Username' in table 'Users' is DBNull.", e) - End Try - End Get - Set - Me(Me.tableUsers.UsernameColumn) = value - End Set - End Property - - _ - Public Property Password() As String - Get - Try - Return CType(Me(Me.tableUsers.PasswordColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("The value for column 'Password' in table 'Users' is DBNull.", e) - End Try - End Get - Set - Me(Me.tableUsers.PasswordColumn) = value - End Set - End Property - - _ - Public Property User_DetailsRow() As User_DetailsRow - Get - Return CType(Me.GetParentRow(Me.Table.ParentRelations("User_DetailsUsers")),User_DetailsRow) - End Get - Set - Me.SetParentRow(value, Me.Table.ParentRelations("User_DetailsUsers")) - End Set - End Property - - _ - Public Function IsUser_DetailsIDNull() As Boolean - Return Me.IsNull(Me.tableUsers.User_DetailsIDColumn) - End Function - - _ - Public Sub SetUser_DetailsIDNull() - Me(Me.tableUsers.User_DetailsIDColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsUsernameNull() As Boolean - Return Me.IsNull(Me.tableUsers.UsernameColumn) - End Function - - _ - Public Sub SetUsernameNull() - Me(Me.tableUsers.UsernameColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsPasswordNull() As Boolean - Return Me.IsNull(Me.tableUsers.PasswordColumn) - End Function - - _ - Public Sub SetPasswordNull() - Me(Me.tableUsers.PasswordColumn) = Global.System.Convert.DBNull - End Sub - End Class - ''' '''Represents strongly named DataRow class. ''' @@ -5246,55 +5035,266 @@ Partial Public Class NEADataSet _ - Public Sub SetCVCNull() - Me(Me.tableUser_Details.CVCColumn) = Global.System.Convert.DBNull - End Sub + Public Sub SetCVCNull() + Me(Me.tableUser_Details.CVCColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsIGNNull() As Boolean + Return Me.IsNull(Me.tableUser_Details.IGNColumn) + End Function + + _ + Public Sub SetIGNNull() + Me(Me.tableUser_Details.IGNColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsEmailNull() As Boolean + Return Me.IsNull(Me.tableUser_Details.EmailColumn) + End Function + + _ + Public Sub SetEmailNull() + Me(Me.tableUser_Details.EmailColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsProfilePicNull() As Boolean + Return Me.IsNull(Me.tableUser_Details.ProfilePicColumn) + End Function + + _ + Public Sub SetProfilePicNull() + Me(Me.tableUser_Details.ProfilePicColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function GetUsersRows() As UsersRow() + If (Me.Table.ChildRelations("User_DetailsUsers") Is Nothing) Then + Return New UsersRow(-1) {} + Else + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("User_DetailsUsers")),UsersRow()) + End If + End Function + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class UsersRow + Inherits Global.System.Data.DataRow + + Private tableUsers As UsersDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableUsers = CType(Me.Table,UsersDataTable) + End Sub + + _ + Public Property UserID() As Integer + Get + Return CType(Me(Me.tableUsers.UserIDColumn),Integer) + End Get + Set + Me(Me.tableUsers.UserIDColumn) = value + End Set + End Property + + _ + Public Property User_DetailsID() As Integer + Get + Try + Return CType(Me(Me.tableUsers.User_DetailsIDColumn),Integer) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("The value for column 'User_DetailsID' in table 'Users' is DBNull.", e) + End Try + End Get + Set + Me(Me.tableUsers.User_DetailsIDColumn) = value + End Set + End Property + + _ + Public Property Username() As String + Get + Try + Return CType(Me(Me.tableUsers.UsernameColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("The value for column 'Username' in table 'Users' is DBNull.", e) + End Try + End Get + Set + Me(Me.tableUsers.UsernameColumn) = value + End Set + End Property + + _ + Public Property Password() As String + Get + Try + Return CType(Me(Me.tableUsers.PasswordColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("The value for column 'Password' in table 'Users' is DBNull.", e) + End Try + End Get + Set + Me(Me.tableUsers.PasswordColumn) = value + End Set + End Property + + _ + Public Property User_DetailsRow() As User_DetailsRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("User_DetailsUsers")),User_DetailsRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("User_DetailsUsers")) + End Set + End Property + + _ + Public Function IsUser_DetailsIDNull() As Boolean + Return Me.IsNull(Me.tableUsers.User_DetailsIDColumn) + End Function + + _ + Public Sub SetUser_DetailsIDNull() + Me(Me.tableUsers.User_DetailsIDColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsUsernameNull() As Boolean + Return Me.IsNull(Me.tableUsers.UsernameColumn) + End Function + + _ + Public Sub SetUsernameNull() + Me(Me.tableUsers.UsernameColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsPasswordNull() As Boolean + Return Me.IsNull(Me.tableUsers.PasswordColumn) + End Function + + _ + Public Sub SetPasswordNull() + Me(Me.tableUsers.PasswordColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class WishlistRow + Inherits Global.System.Data.DataRow + + Private tableWishlist As WishlistDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableWishlist = CType(Me.Table,WishlistDataTable) + End Sub + + _ + Public Property WishlistID() As Integer + Get + Return CType(Me(Me.tableWishlist.WishlistIDColumn),Integer) + End Get + Set + Me(Me.tableWishlist.WishlistIDColumn) = value + End Set + End Property + + _ + Public Property UserID() As Integer + Get + Try + Return CType(Me(Me.tableWishlist.UserIDColumn),Integer) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'Wishlist' is DBNull.", e) + End Try + End Get + Set + Me(Me.tableWishlist.UserIDColumn) = value + End Set + End Property _ - Public Function IsIGNNull() As Boolean - Return Me.IsNull(Me.tableUser_Details.IGNColumn) - End Function + Public Property GameID() As Integer + Get + Try + Return CType(Me(Me.tableWishlist.GameIDColumn),Integer) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("The value for column 'GameID' in table 'Wishlist' is DBNull.", e) + End Try + End Get + Set + Me(Me.tableWishlist.GameIDColumn) = value + End Set + End Property _ - Public Sub SetIGNNull() - Me(Me.tableUser_Details.IGNColumn) = Global.System.Convert.DBNull - End Sub + Public Property GamesRow() As GamesRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("GamesWishlist")),GamesRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("GamesWishlist")) + End Set + End Property _ - Public Function IsEmailNull() As Boolean - Return Me.IsNull(Me.tableUser_Details.EmailColumn) + Public Function IsUserIDNull() As Boolean + Return Me.IsNull(Me.tableWishlist.UserIDColumn) End Function _ - Public Sub SetEmailNull() - Me(Me.tableUser_Details.EmailColumn) = Global.System.Convert.DBNull + Public Sub SetUserIDNull() + Me(Me.tableWishlist.UserIDColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsProfilePicNull() As Boolean - Return Me.IsNull(Me.tableUser_Details.ProfilePicColumn) + Public Function IsGameIDNull() As Boolean + Return Me.IsNull(Me.tableWishlist.GameIDColumn) End Function _ - Public Sub SetProfilePicNull() - Me(Me.tableUser_Details.ProfilePicColumn) = Global.System.Convert.DBNull + Public Sub SetGameIDNull() + Me(Me.tableWishlist.GameIDColumn) = Global.System.Convert.DBNull End Sub - - _ - Public Function GetUsersRows() As UsersRow() - If (Me.Table.ChildRelations("User_DetailsUsers") Is Nothing) Then - Return New UsersRow(-1) {} - Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("User_DetailsUsers")),UsersRow()) - End If - End Function End Class ''' @@ -5553,16 +5553,16 @@ Partial Public Class NEADataSet '''Row event argument class ''' _ - Public Class WishlistRowChangeEvent + Public Class User_DetailsRowChangeEvent Inherits Global.System.EventArgs - Private eventRow As WishlistRow + Private eventRow As User_DetailsRow Private eventAction As Global.System.Data.DataRowAction _ - Public Sub New(ByVal row As WishlistRow, ByVal action As Global.System.Data.DataRowAction) + Public Sub New(ByVal row As User_DetailsRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action @@ -5570,7 +5570,7 @@ Partial Public Class NEADataSet _ - Public ReadOnly Property Row() As WishlistRow + Public ReadOnly Property Row() As User_DetailsRow Get Return Me.eventRow End Get @@ -5625,16 +5625,16 @@ Partial Public Class NEADataSet '''Row event argument class ''' _ - Public Class User_DetailsRowChangeEvent + Public Class WishlistRowChangeEvent Inherits Global.System.EventArgs - Private eventRow As User_DetailsRow + Private eventRow As WishlistRow Private eventAction As Global.System.Data.DataRowAction _ - Public Sub New(ByVal row As User_DetailsRow, ByVal action As Global.System.Data.DataRowAction) + Public Sub New(ByVal row As WishlistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action @@ -5642,7 +5642,7 @@ Partial Public Class NEADataSet _ - Public ReadOnly Property Row() As User_DetailsRow + Public ReadOnly Property Row() As WishlistRow Get Return Me.eventRow End Get @@ -5844,7 +5844,7 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ - Partial Public Class WishlistTableAdapter + Partial Public Class User_DetailsTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.OleDb.OleDbDataAdapter @@ -8313,47 +8313,80 @@ Namespace NEADataSetTableAdapters Me._adapter = New Global.System.Data.OleDb.OleDbDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" - tableMapping.DataSetTable = "Wishlist" - tableMapping.ColumnMappings.Add("WishlistID", "WishlistID") - tableMapping.ColumnMappings.Add("UserID", "UserID") - tableMapping.ColumnMappings.Add("GameID", "GameID") + tableMapping.DataSetTable = "User_Details" + tableMapping.ColumnMappings.Add("UserDetailsID", "UserDetailsID") + tableMapping.ColumnMappings.Add("FirstName", "FirstName") + tableMapping.ColumnMappings.Add("LastName", "LastName") + tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1") + tableMapping.ColumnMappings.Add("Town", "Town") + tableMapping.ColumnMappings.Add("Postcode", "Postcode") + tableMapping.ColumnMappings.Add("CardNumber", "CardNumber") + tableMapping.ColumnMappings.Add("CVC", "CVC") + tableMapping.ColumnMappings.Add("IGN", "IGN") + tableMapping.ColumnMappings.Add("Email", "Email") + tableMapping.ColumnMappings.Add("ProfilePic", "ProfilePic") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.DeleteCommand.Connection = Me.Connection - Me._adapter.DeleteCommand.CommandText = "DELETE FROM `Wishlist` WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL"& _ - ") OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?)))" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM `User_Details` WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS"& _ + " NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` ="& _ + " ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_WishlistID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "WishlistID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserDetailsID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserDetailsID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Town", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, false, Nothing)) Me._adapter.InsertCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.InsertCommand.Connection = Me.Connection - Me._adapter.InsertCommand.CommandText = "INSERT INTO `Wishlist` (`UserID`, `GameID`) VALUES (?, ?)" + Me._adapter.InsertCommand.CommandText = "INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Pos"& _ + "tcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?"& _ + ", ?, ?, ?, ?, ?)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("FirstName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("LastName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("AddressLine1", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "AddressLine1", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Postcode", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Postcode", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IGN", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "IGN", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Email", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Email", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ProfilePic", Global.System.Data.OleDb.OleDbType.LongVarBinary, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ProfilePic", Global.System.Data.DataRowVersion.Current, false, Nothing)) Me._adapter.UpdateCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE `Wishlist` SET `UserID` = ?, `GameID` = ? WHERE ((`WishlistID` = ?) AND (("& _ - "? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL)"& _ - " OR (`GameID` = ?)))" + Me._adapter.UpdateCommand.CommandText = "UPDATE `User_Details` SET `FirstName` = ?, `LastName` = ?, `AddressLine1` = ?, `T"& _ + "own` = ?, `Postcode` = ?, `CardNumber` = ?, `CVC` = ?, `IGN` = ?, `Email` = ?, `"& _ + "ProfilePic` = ? WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR "& _ + "(`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ("& _ + "(? = 1 AND `CVC` IS NULL) OR (`CVC` = ?)))" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_WishlistID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "WishlistID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("FirstName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("LastName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("AddressLine1", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "AddressLine1", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Postcode", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Postcode", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IGN", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "IGN", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Email", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Email", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ProfilePic", Global.System.Data.OleDb.OleDbType.LongVarBinary, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ProfilePic", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserDetailsID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserDetailsID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Town", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, false, Nothing)) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.OleDb.OleDbConnection() - Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString_accdb + Me._connection.ConnectionString = Global.NEA.MySettings.Default.NEAConnectionString2 End Sub _ - Public Overloads Overridable Function Fill(ByVal dataTable As NEADataSet.WishlistDataTable) As Integer + Public Overloads Overridable Function Fill(ByVal dataTable As NEADataSet.User_DetailsDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear @@ -8383,9 +8417,9 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ - Public Overloads Overridable Function GetData() As NEADataSet.WishlistDataTable + Public Overloads Overridable Function GetData() As NEADataSet.User_DetailsDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Dim dataTable As NEADataSet.WishlistDataTable = New NEADataSet.WishlistDataTable() + Dim dataTable As NEADataSet.User_DetailsDataTable = New NEADataSet.User_DetailsDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function @@ -8393,7 +8427,7 @@ Namespace NEADataSetTableAdapters _ - Public Overloads Overridable Function Update(ByVal dataTable As NEADataSet.WishlistDataTable) As Integer + Public Overloads Overridable Function Update(ByVal dataTable As NEADataSet.User_DetailsDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function @@ -8401,7 +8435,7 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Public Overloads Overridable Function Update(ByVal dataSet As NEADataSet) As Integer - Return Me.Adapter.Update(dataSet, "Wishlist") + Return Me.Adapter.Update(dataSet, "User_Details") End Function _ - Public Overloads Overridable Function Delete(ByVal Original_WishlistID As Integer, ByVal Original_UserID As Global.System.Nullable(Of Integer), ByVal Original_GameID As Global.System.Nullable(Of Integer)) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_WishlistID,Integer) - If (Original_UserID.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_UserID.Value,Integer) - Else + Public Overloads Overridable Function Delete(ByVal Original_UserDetailsID As Integer, ByVal Original_Town As String, ByVal Original_CardNumber As Global.System.Nullable(Of Integer), ByVal Original_CVC As Global.System.Nullable(Of Integer)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_UserDetailsID,Integer) + If (Original_Town Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value + Else + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Town,String) End If - If (Original_GameID.HasValue = true) Then + If (Original_CardNumber.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_GameID.Value,Integer) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_CardNumber.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If + If (Original_CVC.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_CVC.Value,Integer) + Else + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value + End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then @@ -8457,16 +8498,56 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _ - Public Overloads Overridable Function Insert(ByVal UserID As Global.System.Nullable(Of Integer), ByVal GameID As Global.System.Nullable(Of Integer)) As Integer - If (UserID.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(0).Value = CType(UserID.Value,Integer) - Else + Public Overloads Overridable Function Insert(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Global.System.Nullable(Of Integer), ByVal CVC As Global.System.Nullable(Of Integer), ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte) As Integer + If (FirstName Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(0).Value = CType(FirstName,String) + End If + If (LastName Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(1).Value = CType(LastName,String) + End If + If (AddressLine1 Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(2).Value = CType(AddressLine1,String) + End If + If (Town Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(3).Value = CType(Town,String) + End If + If (Postcode Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(4).Value = CType(Postcode,String) + End If + If (CardNumber.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(5).Value = CType(CardNumber.Value,Integer) + Else + Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value + End If + If (CVC.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(6).Value = CType(CVC.Value,Integer) + Else + Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value + End If + If (IGN Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(7).Value = CType(IGN,String) + End If + If (Email Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(8).Value = CType(Email,String) End If - If (GameID.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(1).Value = CType(GameID.Value,Integer) + If (ProfilePic Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value + Me.Adapter.InsertCommand.Parameters(9).Value = CType(ProfilePic,Byte()) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ @@ -8487,32 +8568,79 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _ - Public Overloads Overridable Function Update(ByVal UserID As Global.System.Nullable(Of Integer), ByVal GameID As Global.System.Nullable(Of Integer), ByVal Original_WishlistID As Integer, ByVal Original_UserID As Global.System.Nullable(Of Integer), ByVal Original_GameID As Global.System.Nullable(Of Integer)) As Integer - If (UserID.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(UserID.Value,Integer) - Else + Public Overloads Overridable Function Update(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Global.System.Nullable(Of Integer), ByVal CVC As Global.System.Nullable(Of Integer), ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte, ByVal Original_UserDetailsID As Integer, ByVal Original_Town As String, ByVal Original_CardNumber As Global.System.Nullable(Of Integer), ByVal Original_CVC As Global.System.Nullable(Of Integer)) As Integer + If (FirstName Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value - End If - If (GameID.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(GameID.Value,Integer) Else + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(FirstName,String) + End If + If (LastName Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(LastName,String) End If - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_WishlistID,Integer) - If (Original_UserID.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(0,Object) - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_UserID.Value,Integer) + If (AddressLine1 Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(1,Object) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(AddressLine1,String) + End If + If (Town Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Town,String) + End If + If (Postcode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Postcode,String) End If - If (Original_GameID.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object) - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_GameID.Value,Integer) + If (CardNumber.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(CardNumber.Value,Integer) + Else + Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value + End If + If (CVC.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CVC.Value,Integer) Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If + If (IGN Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(IGN,String) + End If + If (Email Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Email,String) + End If + If (ProfilePic Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(ProfilePic,Byte()) + End If + Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_UserDetailsID,Integer) + If (Original_Town Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) + Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_Town,String) + End If + If (Original_CardNumber.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_CardNumber.Value,Integer) + Else + Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) + Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value + End If + If (Original_CVC.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_CVC.Value,Integer) + Else + Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) + Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value + End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then @@ -8703,7 +8831,7 @@ Namespace NEADataSetTableAdapters Me._commandCollection = New Global.System.Data.OleDb.OleDbCommand(0) {} Me._commandCollection(0) = New Global.System.Data.OleDb.OleDbCommand() Me._commandCollection(0).Connection = Me.Connection - Me._commandCollection(0).CommandText = "SELECT Users.*"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM Users" + Me._commandCollection(0).CommandText = "SELECT UserID, User_DetailsID, Username, [Password] FROM Users" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub @@ -8875,7 +9003,7 @@ Namespace NEADataSetTableAdapters Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ - Partial Public Class User_DetailsTableAdapter + Partial Public Class WishlistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.OleDb.OleDbDataAdapter @@ -8992,73 +9120,40 @@ Namespace NEADataSetTableAdapters Me._adapter = New Global.System.Data.OleDb.OleDbDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" - tableMapping.DataSetTable = "User_Details" - tableMapping.ColumnMappings.Add("UserDetailsID", "UserDetailsID") - tableMapping.ColumnMappings.Add("FirstName", "FirstName") - tableMapping.ColumnMappings.Add("LastName", "LastName") - tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1") - tableMapping.ColumnMappings.Add("Town", "Town") - tableMapping.ColumnMappings.Add("Postcode", "Postcode") - tableMapping.ColumnMappings.Add("CardNumber", "CardNumber") - tableMapping.ColumnMappings.Add("CVC", "CVC") - tableMapping.ColumnMappings.Add("IGN", "IGN") - tableMapping.ColumnMappings.Add("Email", "Email") - tableMapping.ColumnMappings.Add("ProfilePic", "ProfilePic") + tableMapping.DataSetTable = "Wishlist" + tableMapping.ColumnMappings.Add("WishlistID", "WishlistID") + tableMapping.ColumnMappings.Add("UserID", "UserID") + tableMapping.ColumnMappings.Add("GameID", "GameID") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.DeleteCommand.Connection = Me.Connection - Me._adapter.DeleteCommand.CommandText = "DELETE FROM `User_Details` WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS"& _ - " NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` ="& _ - " ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?)))" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM `Wishlist` WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL"& _ + ") OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserDetailsID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserDetailsID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Town", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_WishlistID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "WishlistID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, false, Nothing)) Me._adapter.InsertCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.InsertCommand.Connection = Me.Connection - Me._adapter.InsertCommand.CommandText = "INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Pos"& _ - "tcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?"& _ - ", ?, ?, ?, ?, ?)" + Me._adapter.InsertCommand.CommandText = "INSERT INTO `Wishlist` (`UserID`, `GameID`) VALUES (?, ?)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("FirstName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("LastName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("AddressLine1", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "AddressLine1", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Postcode", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Postcode", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IGN", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "IGN", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Email", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Email", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ProfilePic", Global.System.Data.OleDb.OleDbType.LongVarBinary, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ProfilePic", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Current, false, Nothing)) Me._adapter.UpdateCommand = New Global.System.Data.OleDb.OleDbCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE `User_Details` SET `FirstName` = ?, `LastName` = ?, `AddressLine1` = ?, `T"& _ - "own` = ?, `Postcode` = ?, `CardNumber` = ?, `CVC` = ?, `IGN` = ?, `Email` = ?, `"& _ - "ProfilePic` = ? WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR "& _ - "(`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ("& _ - "(? = 1 AND `CVC` IS NULL) OR (`CVC` = ?)))" + Me._adapter.UpdateCommand.CommandText = "UPDATE `Wishlist` SET `UserID` = ?, `GameID` = ? WHERE ((`WishlistID` = ?) AND (("& _ + "? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL)"& _ + " OR (`GameID` = ?)))" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("FirstName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("LastName", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("AddressLine1", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "AddressLine1", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Postcode", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Postcode", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IGN", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "IGN", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Email", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Email", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ProfilePic", Global.System.Data.OleDb.OleDbType.LongVarBinary, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ProfilePic", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserDetailsID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserDetailsID", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Town", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Town", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Original, false, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, true, Nothing)) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Current, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_WishlistID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "WishlistID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_UserID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "UserID", Global.System.Data.DataRowVersion.Original, false, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, true, Nothing)) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_GameID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "GameID", Global.System.Data.DataRowVersion.Original, false, Nothing)) End Sub _ Private Sub InitCommandCollection() - Me._commandCollection = New Global.System.Data.OleDb.OleDbCommand(1) {} + Me._commandCollection = New Global.System.Data.OleDb.OleDbCommand(0) {} Me._commandCollection(0) = New Global.System.Data.OleDb.OleDbCommand() Me._commandCollection(0).Connection = Me.Connection - Me._commandCollection(0).CommandText = "SELECT User_Details.*"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM User_Details" + Me._commandCollection(0).CommandText = "SELECT WishlistID, UserID, GameID FROM Wishlist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1) = New Global.System.Data.OleDb.OleDbCommand() - Me._commandCollection(1).Connection = Me.Connection - Me._commandCollection(1).CommandText = "INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Pos"& _ - "tcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?"& _ - ", ?, ?, ?, ?, ?)" - Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("FirstName", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("LastName", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("AddressLine1", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "AddressLine1", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Town", Global.System.Data.OleDb.OleDbType.WChar, 255, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Town", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Postcode", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Postcode", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CardNumber", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CardNumber", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("CVC", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "CVC", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IGN", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "IGN", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Email", Global.System.Data.OleDb.OleDbType.WChar, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Email", Global.System.Data.DataRowVersion.Current, false, Nothing)) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ProfilePic", Global.System.Data.OleDb.OleDbType.Binary, 1024, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ProfilePic", Global.System.Data.DataRowVersion.Current, false, Nothing)) End Sub _ - Public Overloads Overridable Function Fill(ByVal dataTable As NEADataSet.User_DetailsDataTable) As Integer + Public Overloads Overridable Function Fill(ByVal dataTable As NEADataSet.WishlistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear @@ -9111,9 +9190,9 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ - Public Overloads Overridable Function GetData() As NEADataSet.User_DetailsDataTable + Public Overloads Overridable Function GetData() As NEADataSet.WishlistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Dim dataTable As NEADataSet.User_DetailsDataTable = New NEADataSet.User_DetailsDataTable() + Dim dataTable As NEADataSet.WishlistDataTable = New NEADataSet.WishlistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function @@ -9121,7 +9200,7 @@ Namespace NEADataSetTableAdapters _ - Public Overloads Overridable Function Update(ByVal dataTable As NEADataSet.User_DetailsDataTable) As Integer + Public Overloads Overridable Function Update(ByVal dataTable As NEADataSet.WishlistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function @@ -9129,7 +9208,7 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Public Overloads Overridable Function Update(ByVal dataSet As NEADataSet) As Integer - Return Me.Adapter.Update(dataSet, "User_Details") + Return Me.Adapter.Update(dataSet, "Wishlist") End Function _ - Public Overloads Overridable Function Delete(ByVal Original_UserDetailsID As Integer, ByVal Original_Town As String, ByVal Original_CardNumber As Global.System.Nullable(Of Integer), ByVal Original_CVC As Global.System.Nullable(Of Integer)) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_UserDetailsID,Integer) - If (Original_Town Is Nothing) Then + Public Overloads Overridable Function Delete(ByVal Original_WishlistID As Integer, ByVal Original_UserID As Global.System.Nullable(Of Integer), ByVal Original_GameID As Global.System.Nullable(Of Integer)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_WishlistID,Integer) + If (Original_UserID.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_UserID.Value,Integer) + Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Town,String) End If - If (Original_CardNumber.HasValue = true) Then + If (Original_GameID.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_CardNumber.Value,Integer) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_GameID.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If - If (Original_CVC.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_CVC.Value,Integer) - Else - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value - End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then @@ -9185,63 +9257,23 @@ Namespace NEADataSetTableAdapters If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If - End Try - End Function - - _ - Public Overloads Overridable Function Insert(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Global.System.Nullable(Of Integer), ByVal CVC As Global.System.Nullable(Of Integer), ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte) As Integer - If (FirstName Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(0).Value = CType(FirstName,String) - End If - If (LastName Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(LastName,String) - End If - If (AddressLine1 Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(AddressLine1,String) - End If - If (Town Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(Town,String) - End If - If (Postcode Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(Postcode,String) - End If - If (CardNumber.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(5).Value = CType(CardNumber.Value,Integer) - Else - Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value - End If - If (CVC.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(6).Value = CType(CVC.Value,Integer) - Else - Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value - End If - If (IGN Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value - Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(IGN,String) - End If - If (Email Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value + End Try + End Function + + _ + Public Overloads Overridable Function Insert(ByVal UserID As Global.System.Nullable(Of Integer), ByVal GameID As Global.System.Nullable(Of Integer)) As Integer + If (UserID.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(0).Value = CType(UserID.Value,Integer) Else - Me.Adapter.InsertCommand.Parameters(8).Value = CType(Email,String) + Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value End If - If (ProfilePic Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value + If (GameID.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(1).Value = CType(GameID.Value,Integer) Else - Me.Adapter.InsertCommand.Parameters(9).Value = CType(ProfilePic,Byte()) + Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ @@ -9262,79 +9294,32 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _ - Public Overloads Overridable Function Update(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Global.System.Nullable(Of Integer), ByVal CVC As Global.System.Nullable(Of Integer), ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte, ByVal Original_UserDetailsID As Integer, ByVal Original_Town As String, ByVal Original_CardNumber As Global.System.Nullable(Of Integer), ByVal Original_CVC As Global.System.Nullable(Of Integer)) As Integer - If (FirstName Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(FirstName,String) - End If - If (LastName Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value + Public Overloads Overridable Function Update(ByVal UserID As Global.System.Nullable(Of Integer), ByVal GameID As Global.System.Nullable(Of Integer), ByVal Original_WishlistID As Integer, ByVal Original_UserID As Global.System.Nullable(Of Integer), ByVal Original_GameID As Global.System.Nullable(Of Integer)) As Integer + If (UserID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(UserID.Value,Integer) Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(LastName,String) + Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value End If - If (AddressLine1 Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value + If (GameID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(GameID.Value,Integer) Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(AddressLine1,String) + Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If - If (Town Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_WishlistID,Integer) + If (Original_UserID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_UserID.Value,Integer) Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Town,String) - End If - If (Postcode Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Postcode,String) - End If - If (CardNumber.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(CardNumber.Value,Integer) - Else - Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If - If (CVC.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CVC.Value,Integer) + If (Original_GameID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_GameID.Value,Integer) Else + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If - If (IGN Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(IGN,String) - End If - If (Email Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Email,String) - End If - If (ProfilePic Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(ProfilePic,Byte()) - End If - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_UserDetailsID,Integer) - If (Original_Town Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value - Else - Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) - Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_Town,String) - End If - If (Original_CardNumber.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) - Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_CardNumber.Value,Integer) - Else - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value - End If - If (Original_CVC.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) - Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_CVC.Value,Integer) - Else - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value - End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then @@ -9349,78 +9334,6 @@ Namespace NEADataSetTableAdapters End If End Try End Function - - _ - Public Overloads Overridable Function InsertQuery(ByVal FirstName As String, ByVal LastName As String, ByVal AddressLine1 As String, ByVal Town As String, ByVal Postcode As String, ByVal CardNumber As Global.System.Nullable(Of Integer), ByVal CVC As Global.System.Nullable(Of Integer), ByVal IGN As String, ByVal Email As String, ByVal ProfilePic() As Byte) As Integer - Dim command As Global.System.Data.OleDb.OleDbCommand = Me.CommandCollection(1) - If (FirstName Is Nothing) Then - command.Parameters(0).Value = Global.System.DBNull.Value - Else - command.Parameters(0).Value = CType(FirstName,String) - End If - If (LastName Is Nothing) Then - command.Parameters(1).Value = Global.System.DBNull.Value - Else - command.Parameters(1).Value = CType(LastName,String) - End If - If (AddressLine1 Is Nothing) Then - command.Parameters(2).Value = Global.System.DBNull.Value - Else - command.Parameters(2).Value = CType(AddressLine1,String) - End If - If (Town Is Nothing) Then - command.Parameters(3).Value = Global.System.DBNull.Value - Else - command.Parameters(3).Value = CType(Town,String) - End If - If (Postcode Is Nothing) Then - command.Parameters(4).Value = Global.System.DBNull.Value - Else - command.Parameters(4).Value = CType(Postcode,String) - End If - If (CardNumber.HasValue = true) Then - command.Parameters(5).Value = CType(CardNumber.Value,Integer) - Else - command.Parameters(5).Value = Global.System.DBNull.Value - End If - If (CVC.HasValue = true) Then - command.Parameters(6).Value = CType(CVC.Value,Integer) - Else - command.Parameters(6).Value = Global.System.DBNull.Value - End If - If (IGN Is Nothing) Then - command.Parameters(7).Value = Global.System.DBNull.Value - Else - command.Parameters(7).Value = CType(IGN,String) - End If - If (Email Is Nothing) Then - command.Parameters(8).Value = Global.System.DBNull.Value - Else - command.Parameters(8).Value = CType(Email,String) - End If - If (ProfilePic Is Nothing) Then - command.Parameters(9).Value = Global.System.DBNull.Value - Else - command.Parameters(9).Value = CType(ProfilePic,Byte()) - End If - Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State - If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ - <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open - End If - Dim returnValue As Integer - Try - returnValue = command.ExecuteNonQuery - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close - End If - End Try - Return returnValue - End Function End Class ''' @@ -9450,11 +9363,11 @@ Namespace NEADataSetTableAdapters Private _tagsTableAdapter As TagsTableAdapter - Private _wishlistTableAdapter As WishlistTableAdapter + Private _user_DetailsTableAdapter As User_DetailsTableAdapter Private _usersTableAdapter As UsersTableAdapter - Private _user_DetailsTableAdapter As User_DetailsTableAdapter + Private _wishlistTableAdapter As WishlistTableAdapter Private _backupDataSetBeforeUpdate As Boolean @@ -9574,12 +9487,12 @@ Namespace NEADataSetTableAdapters Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _ "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _ "a", "System.Drawing.Design.UITypeEditor")> _ - Public Property WishlistTableAdapter() As WishlistTableAdapter + Public Property User_DetailsTableAdapter() As User_DetailsTableAdapter Get - Return Me._wishlistTableAdapter + Return Me._user_DetailsTableAdapter End Get Set - Me._wishlistTableAdapter = value + Me._user_DetailsTableAdapter = value End Set End Property @@ -9602,12 +9515,12 @@ Namespace NEADataSetTableAdapters Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _ "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _ "a", "System.Drawing.Design.UITypeEditor")> _ - Public Property User_DetailsTableAdapter() As User_DetailsTableAdapter + Public Property WishlistTableAdapter() As WishlistTableAdapter Get - Return Me._user_DetailsTableAdapter + Return Me._wishlistTableAdapter End Get Set - Me._user_DetailsTableAdapter = value + Me._wishlistTableAdapter = value End Set End Property @@ -9658,17 +9571,17 @@ Namespace NEADataSetTableAdapters AndAlso (Not (Me._tagsTableAdapter.Connection) Is Nothing)) Then Return Me._tagsTableAdapter.Connection End If - If ((Not (Me._wishlistTableAdapter) Is Nothing) _ - AndAlso (Not (Me._wishlistTableAdapter.Connection) Is Nothing)) Then - Return Me._wishlistTableAdapter.Connection + If ((Not (Me._user_DetailsTableAdapter) Is Nothing) _ + AndAlso (Not (Me._user_DetailsTableAdapter.Connection) Is Nothing)) Then + Return Me._user_DetailsTableAdapter.Connection End If If ((Not (Me._usersTableAdapter) Is Nothing) _ AndAlso (Not (Me._usersTableAdapter.Connection) Is Nothing)) Then Return Me._usersTableAdapter.Connection End If - If ((Not (Me._user_DetailsTableAdapter) Is Nothing) _ - AndAlso (Not (Me._user_DetailsTableAdapter.Connection) Is Nothing)) Then - Return Me._user_DetailsTableAdapter.Connection + If ((Not (Me._wishlistTableAdapter) Is Nothing) _ + AndAlso (Not (Me._wishlistTableAdapter.Connection) Is Nothing)) Then + Return Me._wishlistTableAdapter.Connection End If Return Nothing End Get @@ -9704,13 +9617,13 @@ Namespace NEADataSetTableAdapters If (Not (Me._tagsTableAdapter) Is Nothing) Then count = (count + 1) End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then + If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._usersTableAdapter) Is Nothing) Then count = (count + 1) End If - If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then + If (Not (Me._wishlistTableAdapter) Is Nothing) Then count = (count + 1) End If Return count @@ -9796,21 +9709,21 @@ Namespace NEADataSetTableAdapters allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._usersTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._wishlistTableAdapter.Update(updatedRows)) + result = (result + Me._usersTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._usersTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._wishlistTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._usersTableAdapter.Update(updatedRows)) + result = (result + Me._wishlistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If @@ -9888,19 +9801,19 @@ Namespace NEADataSetTableAdapters allAddedRows.AddRange(addedRows) End If End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If (Not (Me._usersTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then - result = (result + Me._wishlistTableAdapter.Update(addedRows)) + result = (result + Me._usersTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If - If (Not (Me._usersTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If (Not (Me._wishlistTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then - result = (result + Me._usersTableAdapter.Update(addedRows)) + result = (result + Me._wishlistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If @@ -9914,19 +9827,19 @@ Namespace NEADataSetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _ Private Function UpdateDeletedRows(ByVal dataSet As NEADataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 - If (Not (Me._usersTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If (Not (Me._wishlistTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._usersTableAdapter.Update(deletedRows)) + result = (result + Me._wishlistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.Wishlist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If (Not (Me._usersTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.Users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._wishlistTableAdapter.Update(deletedRows)) + result = (result + Me._usersTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If @@ -10070,8 +9983,8 @@ Namespace NEADataSetTableAdapters Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If - If ((Not (Me._wishlistTableAdapter) Is Nothing) _ - AndAlso (Me.MatchTableAdapterConnection(Me._wishlistTableAdapter.Connection) = false)) Then + If ((Not (Me._user_DetailsTableAdapter) Is Nothing) _ + AndAlso (Me.MatchTableAdapterConnection(Me._user_DetailsTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If @@ -10080,8 +9993,8 @@ Namespace NEADataSetTableAdapters Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If - If ((Not (Me._user_DetailsTableAdapter) Is Nothing) _ - AndAlso (Me.MatchTableAdapterConnection(Me._user_DetailsTableAdapter.Connection) = false)) Then + If ((Not (Me._wishlistTableAdapter) Is Nothing) _ + AndAlso (Me.MatchTableAdapterConnection(Me._wishlistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If @@ -10180,13 +10093,13 @@ Namespace NEADataSetTableAdapters adaptersWithAcceptChangesDuringUpdate.Add(Me._tagsTableAdapter.Adapter) End If End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then - revertConnections.Add(Me._wishlistTableAdapter, Me._wishlistTableAdapter.Connection) - Me._wishlistTableAdapter.Connection = CType(workConnection,Global.System.Data.OleDb.OleDbConnection) - Me._wishlistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.OleDb.OleDbTransaction) - If Me._wishlistTableAdapter.Adapter.AcceptChangesDuringUpdate Then - Me._wishlistTableAdapter.Adapter.AcceptChangesDuringUpdate = false - adaptersWithAcceptChangesDuringUpdate.Add(Me._wishlistTableAdapter.Adapter) + If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then + revertConnections.Add(Me._user_DetailsTableAdapter, Me._user_DetailsTableAdapter.Connection) + Me._user_DetailsTableAdapter.Connection = CType(workConnection,Global.System.Data.OleDb.OleDbConnection) + Me._user_DetailsTableAdapter.Transaction = CType(workTransaction,Global.System.Data.OleDb.OleDbTransaction) + If Me._user_DetailsTableAdapter.Adapter.AcceptChangesDuringUpdate Then + Me._user_DetailsTableAdapter.Adapter.AcceptChangesDuringUpdate = false + adaptersWithAcceptChangesDuringUpdate.Add(Me._user_DetailsTableAdapter.Adapter) End If End If If (Not (Me._usersTableAdapter) Is Nothing) Then @@ -10198,13 +10111,13 @@ Namespace NEADataSetTableAdapters adaptersWithAcceptChangesDuringUpdate.Add(Me._usersTableAdapter.Adapter) End If End If - If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then - revertConnections.Add(Me._user_DetailsTableAdapter, Me._user_DetailsTableAdapter.Connection) - Me._user_DetailsTableAdapter.Connection = CType(workConnection,Global.System.Data.OleDb.OleDbConnection) - Me._user_DetailsTableAdapter.Transaction = CType(workTransaction,Global.System.Data.OleDb.OleDbTransaction) - If Me._user_DetailsTableAdapter.Adapter.AcceptChangesDuringUpdate Then - Me._user_DetailsTableAdapter.Adapter.AcceptChangesDuringUpdate = false - adaptersWithAcceptChangesDuringUpdate.Add(Me._user_DetailsTableAdapter.Adapter) + If (Not (Me._wishlistTableAdapter) Is Nothing) Then + revertConnections.Add(Me._wishlistTableAdapter, Me._wishlistTableAdapter.Connection) + Me._wishlistTableAdapter.Connection = CType(workConnection,Global.System.Data.OleDb.OleDbConnection) + Me._wishlistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.OleDb.OleDbTransaction) + If Me._wishlistTableAdapter.Adapter.AcceptChangesDuringUpdate Then + Me._wishlistTableAdapter.Adapter.AcceptChangesDuringUpdate = false + adaptersWithAcceptChangesDuringUpdate.Add(Me._wishlistTableAdapter.Adapter) End If End If ' @@ -10295,17 +10208,17 @@ Namespace NEADataSetTableAdapters Me._tagsTableAdapter.Connection = CType(revertConnections(Me._tagsTableAdapter),Global.System.Data.OleDb.OleDbConnection) Me._tagsTableAdapter.Transaction = Nothing End If - If (Not (Me._wishlistTableAdapter) Is Nothing) Then - Me._wishlistTableAdapter.Connection = CType(revertConnections(Me._wishlistTableAdapter),Global.System.Data.OleDb.OleDbConnection) - Me._wishlistTableAdapter.Transaction = Nothing + If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then + Me._user_DetailsTableAdapter.Connection = CType(revertConnections(Me._user_DetailsTableAdapter),Global.System.Data.OleDb.OleDbConnection) + Me._user_DetailsTableAdapter.Transaction = Nothing End If If (Not (Me._usersTableAdapter) Is Nothing) Then Me._usersTableAdapter.Connection = CType(revertConnections(Me._usersTableAdapter),Global.System.Data.OleDb.OleDbConnection) Me._usersTableAdapter.Transaction = Nothing End If - If (Not (Me._user_DetailsTableAdapter) Is Nothing) Then - Me._user_DetailsTableAdapter.Connection = CType(revertConnections(Me._user_DetailsTableAdapter),Global.System.Data.OleDb.OleDbConnection) - Me._user_DetailsTableAdapter.Transaction = Nothing + If (Not (Me._wishlistTableAdapter) Is Nothing) Then + Me._wishlistTableAdapter.Connection = CType(revertConnections(Me._wishlistTableAdapter),Global.System.Data.OleDb.OleDbConnection) + Me._wishlistTableAdapter.Transaction = Nothing End If If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter diff --git a/NEA/NEADataSet.vb b/NEA/NEADataSet.vb index 450f3a2..a2dc552 100644 --- a/NEA/NEADataSet.vb +++ b/NEA/NEADataSet.vb @@ -1,10 +1,8 @@  -Partial Class NEADataSet +Partial Public Class NEADataSet End Class -Namespace NEADataSetTableAdapters - Partial Public Class User_DetailsTableAdapter - End Class -End Namespace +Partial Public Class NEADataSet +End Class diff --git a/NEA/NEADataSet.xsd b/NEA/NEADataSet.xsd index aae99a0..9b98cc1 100644 --- a/NEA/NEADataSet.xsd +++ b/NEA/NEADataSet.xsd @@ -2,15 +2,14 @@ - + - - + DELETE FROM `Achievement` WHERE ((`AchievementID` = ?) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?)) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?))) @@ -78,7 +77,7 @@ - + DELETE FROM `DOW` WHERE ((`DOWID` = ?) AND ((? = 1 AND `Start` IS NULL) OR (`Start` = ?)) AND ((? = 1 AND `End` IS NULL) OR (`End` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) @@ -138,7 +137,7 @@ - + DELETE FROM `Friends` WHERE ((`ID` = ?) AND ((? = 1 AND `FriendID` IS NULL) OR (`FriendID` = ?)) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?))) @@ -191,7 +190,7 @@ - + DELETE FROM `Games` WHERE ((`GameID` = ?) AND ((? = 1 AND `Price` IS NULL) OR (`Price` = ?)) AND ((? = 1 AND `Rating` IS NULL) OR (`Rating` = ?)) AND ((? = 1 AND `Certificate` IS NULL) OR (`Certificate` = ?)) AND ((? = 1 AND `Theme Colour` IS NULL) OR (`Theme Colour` = ?))) @@ -273,7 +272,7 @@ - + DELETE FROM `Purchased` WHERE ((`PurchaseID` = ?) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) @@ -326,7 +325,7 @@ - + DELETE FROM `Reviews` WHERE ((`ReviewID` = ?) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) @@ -375,7 +374,7 @@ - + DELETE FROM `Tags` WHERE ((`ID` = ?)) @@ -411,56 +410,84 @@ - + - + - DELETE FROM `Wishlist` WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) + DELETE FROM `User_Details` WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?))) - - - - - + + + + + + + - INSERT INTO `Wishlist` (`UserID`, `GameID`) VALUES (?, ?) + INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Postcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - - + + + + + + + + + + - - SELECT WishlistID, UserID, GameID FROM Wishlist + + SELECT UserDetailsID, FirstName, LastName, AddressLine1, Town, Postcode, CardNumber, CVC, IGN, Email, ProfilePic FROM User_Details - UPDATE `Wishlist` SET `UserID` = ?, `GameID` = ? WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) + UPDATE `User_Details` SET `FirstName` = ?, `LastName` = ?, `AddressLine1` = ?, `Town` = ?, `Postcode` = ?, `CardNumber` = ?, `CVC` = ?, `IGN` = ?, `Email` = ?, `ProfilePic` = ? WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?))) - - - - - - - + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + @@ -488,9 +515,8 @@ - - SELECT Users.* -FROM Users + + SELECT UserID, User_DetailsID, Username, [Password] FROM Users @@ -517,107 +543,58 @@ FROM Users - + - + - DELETE FROM `User_Details` WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?))) + DELETE FROM `Wishlist` WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) - - - - - - - + + + + + - INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Postcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + INSERT INTO `Wishlist` (`UserID`, `GameID`) VALUES (?, ?) - - - - - - - - - - + + - - SELECT User_Details.* -FROM User_Details + + SELECT WishlistID, UserID, GameID FROM Wishlist - UPDATE `User_Details` SET `FirstName` = ?, `LastName` = ?, `AddressLine1` = ?, `Town` = ?, `Postcode` = ?, `CardNumber` = ?, `CVC` = ?, `IGN` = ?, `Email` = ?, `ProfilePic` = ? WHERE ((`UserDetailsID` = ?) AND ((? = 1 AND `Town` IS NULL) OR (`Town` = ?)) AND ((? = 1 AND `CardNumber` IS NULL) OR (`CardNumber` = ?)) AND ((? = 1 AND `CVC` IS NULL) OR (`CVC` = ?))) + UPDATE `Wishlist` SET `UserID` = ?, `GameID` = ? WHERE ((`WishlistID` = ?) AND ((? = 1 AND `UserID` IS NULL) OR (`UserID` = ?)) AND ((? = 1 AND `GameID` IS NULL) OR (`GameID` = ?))) - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - + + + - - - - - INSERT INTO `User_Details` (`FirstName`, `LastName`, `AddressLine1`, `Town`, `Postcode`, `CardNumber`, `CVC`, `IGN`, `Email`, `ProfilePic`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - - - - - - - - - - - - - - - - + @@ -767,37 +744,6 @@ FROM User_Details - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -857,6 +803,37 @@ FROM User_Details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -887,17 +864,17 @@ FROM User_Details - - - + + + - - - + + + @@ -906,8 +883,8 @@ FROM User_Details + - \ No newline at end of file diff --git a/NEA/NEADataSet.xss b/NEA/NEADataSet.xss index e69de29..6c0c268 100644 --- a/NEA/NEADataSet.xss +++ b/NEA/NEADataSet.xss @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + 253 + 184 + + + 323 + 184 + + + + + + + 236 + 337 + + + 236 + 386 + + + 323 + 386 + + + + + + + 228 + 337 + + + 228 + 609 + + + 323 + 609 + + + + + + + 220 + 337 + + + 220 + 813 + + + 323 + 813 + + + + + + + 1325 + 146 + + + 1395 + 146 + + + + + + + 212 + 337 + + + 212 + 1017 + + + 323 + 1017 + + + + + \ No newline at end of file