private void buttonSubmit_Click(object sender, EventArgs e) { DataClasses1DataContext zybo = new DataClasses1DataContext(); // For loop that setps through lists and submits data to the SQL. Data is all stored // on lists that the positions correspond with the individual data. This makes it easy to step // through the lists with the same count to get the correct data together. for (int count = 0; count < Measurement.Count; count++) { EET321_Lab5_Table data = new EET321_Lab5_Table(); // Create new data variable for the SQL table data.DateTime = DateTime.Now; // Setting the date/time for the SQL field. data.GroupID = textBoxGroupID.Text; // Pulling GroupID from textbox for the SQL field. data.BoardID = BoardID[count]; // Submitting board ID. data.SystemClockFreq = Systemclockfreq[count]; // Submitting system clock. data.SampleFrequency = Samplefreq[count]; // Submitting sample frequency. data.DataSet = Dataset[count]; // Submitting data set. data.Measurement = Measurement[count]; // Submitting measurement. System.Threading.Thread.Sleep(1000); // Wait for a second. zybo.EET321_Lab5_Tables.InsertOnSubmit(data); zybo.SubmitChanges(); // Submit to the SQL Server } // Clear Lists BoardID.Clear(); Dataset.Clear(); Systemclockfreq.Clear(); Samplefreq.Clear(); Measurement.Clear(); }
partial void DeleteEET321_Lab5_Table(EET321_Lab5_Table instance);
partial void UpdateEET321_Lab5_Table(EET321_Lab5_Table instance);
partial void InsertEET321_Lab5_Table(EET321_Lab5_Table instance);