public Studio(StudioStruct studioStruct) { Id = studioStruct.Id; Naam = studioStruct.Naam; TelefoonNummer = studioStruct.TelefoonNummer; EmailAdres = studioStruct.EmailAdres; Straat = studioStruct.Straat; HuisNummer = studioStruct.HuisNummer; PostCode = studioStruct.PostCode; WoonPlaats = studioStruct.WoonPlaats; Gebruikersnaam = studioStruct.Gebruikersnaam; Wachtwoord = studioStruct.Wachtwoord; }
public void Update(StudioStruct studioStruct) { using (SqlConnection conn = DbConn.connection) { string query = "UPDATE Studio SET Naam = @Naam, Straat = @Straat, Huisnummer = @Huisnummer," + "Postcode = @Postcode, Woonplaats = @Woonplaats, Email = @Email," + "Telefoonnummer = @Telefoonnummer WHERE Id = @Id"; conn.Open(); SqlCommand command = new SqlCommand(query, conn); command.Parameters.AddWithValue("@Naam", studioStruct.Naam); command.Parameters.AddWithValue("@Straat", studioStruct.Straat); command.Parameters.AddWithValue("@Huisnummer", studioStruct.HuisNummer); command.Parameters.AddWithValue("@Postcode", studioStruct.PostCode); command.Parameters.AddWithValue("@Woonplaats", studioStruct.WoonPlaats); command.Parameters.AddWithValue("@Email", studioStruct.EmailAdres); command.Parameters.AddWithValue("@Telefoonnummer", studioStruct.TelefoonNummer); command.Parameters.AddWithValue("Id", studioStruct.Id); command.ExecuteNonQuery(); } }
public void Add(StudioStruct studioStruct) { using (SqlConnection conn = DbConn.connection) { string query = "INSERT INTO Studio(Naam, Straat, Huisnummer, Postcode, Woonplaats, Email," + "Telefoonnummer, Gebruikersnaam, Wachtwoord) Values (@Naam, @Straat, @Huisnummer," + "@Postcode, @Woonplaats, @Email, @Telefoonnummer, @Gebruikersnaam, @Wachtwoord)"; conn.Open(); SqlCommand command = new SqlCommand(query, conn); command.Parameters.AddWithValue("@Naam", studioStruct.Naam); command.Parameters.AddWithValue("@Straat", studioStruct.Straat); command.Parameters.AddWithValue("@Huisnummer", studioStruct.HuisNummer); command.Parameters.AddWithValue("@Postcode", studioStruct.PostCode); command.Parameters.AddWithValue("@Woonplaats", studioStruct.WoonPlaats); command.Parameters.AddWithValue("@Email", studioStruct.EmailAdres); command.Parameters.AddWithValue("@Telefoonnummer", studioStruct.TelefoonNummer); command.Parameters.AddWithValue("@Gebruikersnaam", studioStruct.Gebruikersnaam); command.Parameters.AddWithValue("@Wachtwoord", studioStruct.Wachtwoord); command.ExecuteNonQuery(); } }
public void Update(StudioStruct studioStruct) { throw new NotImplementedException(); }
public void Add(StudioStruct studioStruct) { studioStructList.Add(studioStruct); }
public void Update(StudioStruct studioStruct) { StudioContext.Update(studioStruct); }
public void Add(StudioStruct studioStruct) { StudioContext.Add(studioStruct); }