public void AddCardToDeck(Deck deck, Card card) { IDbCommand command = connector.CreateCommand(); command.CommandText = "INSERT INTO deckList (deckID, cardID) VALUES (@deck, @card);"; command.AddParameterWithValue("deck", deck.GetID()); command.AddParameterWithValue("card", card.GetID()); connector.ExecuteNonQuery(command); }
public void Add(Election t) { IDbCommand command = _connector.CreateCommand(); command.CommandText = "INSERT INTO [Verkiezing] ([Naam], [AantalZetels]) VALUES (@name, @seats);"; command.AddParameterWithValue("name", t.Name); command.AddParameterWithValue("seats", t.Seats); _connector.ExecuteNonQuery(command); }
public void Add(Party t) { IDbCommand command = _connector.CreateCommand(); command.CommandText = "INSERT INTO [Partij] ([Naam], [Lijsttrekker], [AantalLeden]) VALUES (@name, @partyleader, @members);"; command.AddParameterWithValue("name", t.Name); command.AddParameterWithValue("primeminister", t.PartyLeader); command.AddParameterWithValue("members", t.AmountOfMembers); _connector.ExecuteNonQuery(command); }
public void Add(Results t) { IDbCommand command = _connector.CreateCommand(); command.CommandText = "INSERT INTO [Uitslag] ([VerkiezingID], [Naam], [TotaalStemmen]) VALUES (@electionid, @name, @votes);"; command.AddParameterWithValue("electionid", 1); command.AddParameterWithValue("name", t.Name); command.AddParameterWithValue("votes", t.TotalVotes); _connector.ExecuteNonQuery(command); }
public void Add(Coalition t) { IDbCommand command = _connector.CreateCommand(); command.CommandText = "INSERT INTO [Coalitie] ([Naam], [Premier], [Zetels]) VALUES (@name, @primeminister, @seats);"; command.AddParameterWithValue("name", t.Name); command.AddParameterWithValue("primeminister", t.PrimeMinister); command.AddParameterWithValue("seats", t.Seats); _connector.ExecuteNonQuery(command); }