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();
            }
        }
예제 #3
0
            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      = "";
            }
예제 #4
0
 public Instrument(InstrumentStruct instrumentStruct)
 {
     Id       = instrumentStruct.Id;
     Naam     = instrumentStruct.Naam;
     StudioId = instrumentStruct.StudioId;
 }
예제 #5
0
 public void UpdateInstrument(InstrumentStruct instrumentStruct)
 {
     InstrumentStruct instrument = instrumentList.FirstOrDefault(instrmnt => instrmnt.Id == instrumentStruct.Id);
 }
예제 #6
0
 public void AddInstrument(InstrumentStruct instrumentStruct)
 {
     instrumentList.Add(instrumentStruct);
 }
 public void UpdateInstrument(InstrumentStruct instrumentStruct)
 {
     InstrumentContext.UpdateInstrument(instrumentStruct);
 }
 public void AddInstrument(InstrumentStruct instrumentStruct)
 {
     InstrumentContext.AddInstrument(instrumentStruct);
 }