public void UpdateInstrument(InstrumentStruct instrumentStruct) { using (SqlConnection conn = DbConn.connection) { string query = "UPDATE Instrument SET Naam = @Naam"; conn.Open(); SqlCommand command = new SqlCommand(query, conn); command.Parameters.AddWithValue("@Naam", instrumentStruct.Naam); command.ExecuteNonQuery(); } }
public void AddInstrument(InstrumentStruct instrumentStruct) { using (SqlConnection conn = DbConn.connection) { string query = "INSERT INTO Instrument (Naam, StudioId) Values (@Naam, @StudioId)"; conn.Open(); SqlCommand command = new SqlCommand(query, conn); command.Parameters.AddWithValue("@Naam", instrumentStruct.Naam); command.Parameters.AddWithValue("@StudioId", instrumentStruct.StudioId); command.ExecuteNonQuery(); } }
public MuseInput(string genre, string[] encoding, Instruments instruments, int temperature, int trunication) { this.genre = genre; StringBuilder builder = new StringBuilder(); foreach (var e in encoding) { builder.Append(e); builder.Append(' '); } this.encoding = builder.ToString(); instrument = new InstrumentStruct(instruments); this.temperature = temperature; truncation = trunication; generationLength = 255; audioFormat = ""; }
public Instrument(InstrumentStruct instrumentStruct) { Id = instrumentStruct.Id; Naam = instrumentStruct.Naam; StudioId = instrumentStruct.StudioId; }
public void UpdateInstrument(InstrumentStruct instrumentStruct) { InstrumentStruct instrument = instrumentList.FirstOrDefault(instrmnt => instrmnt.Id == instrumentStruct.Id); }
public void AddInstrument(InstrumentStruct instrumentStruct) { instrumentList.Add(instrumentStruct); }
public void UpdateInstrument(InstrumentStruct instrumentStruct) { InstrumentContext.UpdateInstrument(instrumentStruct); }
public void AddInstrument(InstrumentStruct instrumentStruct) { InstrumentContext.AddInstrument(instrumentStruct); }