Пример #1
0
 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;
 }
Пример #2
0
        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();
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
 public void Update(StudioStruct studioStruct)
 {
     throw new NotImplementedException();
 }
Пример #5
0
 public void Add(StudioStruct studioStruct)
 {
     studioStructList.Add(studioStruct);
 }
Пример #6
0
 public void Update(StudioStruct studioStruct)
 {
     StudioContext.Update(studioStruct);
 }
Пример #7
0
 public void Add(StudioStruct studioStruct)
 {
     StudioContext.Add(studioStruct);
 }