コード例 #1
0
ファイル: Form1.cs プロジェクト: KittenMittons/EET321_Lab5
        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();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: KittenMittons/EET321_Lab5
        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();
        }
コード例 #3
0
 partial void DeleteEET321_Lab5_Table(EET321_Lab5_Table instance);
コード例 #4
0
 partial void UpdateEET321_Lab5_Table(EET321_Lab5_Table instance);
コード例 #5
0
 partial void InsertEET321_Lab5_Table(EET321_Lab5_Table instance);
コード例 #6
0
 partial void DeleteEET321_Lab5_Table(EET321_Lab5_Table instance);
コード例 #7
0
 partial void UpdateEET321_Lab5_Table(EET321_Lab5_Table instance);
コード例 #8
0
 partial void InsertEET321_Lab5_Table(EET321_Lab5_Table instance);