예제 #1
0
파일: Form1.cs 프로젝트: M-at-symbol/Lab6
        private void uploadResistanceButton_Click(object sender, EventArgs e)
        {
            var  boardId = textBox2.Text;
            char groupId = Convert.ToChar(textBox1.Text);

            /* Grab data from spreadsheet and place in lists */
            for (int i = 0; i < 100; i++)
            {
                var resistance = Convert.ToSingle(dataGridView2.Rows[i].Cells[0].Value);

                var res  = new EET321_Lab6DataContext();
                var data = new Table_Resistance();


                data.GroupID    = groupId;
                data.BoardID    = boardId;
                data.DateTime   = DateTime.Now;
                data.Resistance = resistance;

                res.Table_Resistances.InsertOnSubmit(data);
                res.SubmitChanges();                                  //submit changes
                Thread.Sleep(100);                                    //wait .1 sec
            }
            System.Windows.Forms.MessageBox.Show("Upload complete!"); //Message upload complete
        }
예제 #2
0
파일: Form1.cs 프로젝트: KittenMittons/Lab6
        private void uploadResistanceButton_Click(object sender, EventArgs e)
        {
            var boardId = textBox2.Text;
            char groupId = Convert.ToChar(textBox1.Text);

                        /* Grab data from spreadsheet and place in lists */
            for (int i = 0; i < 100; i++)
            {

                var resistance = Convert.ToSingle(dataGridView2.Rows[i].Cells[0].Value);

                var res = new EET321_Lab6DataContext();
                var data = new Table_Resistance();

                data.GroupID = groupId;
                data.BoardID = boardId;
                data.DateTime = DateTime.Now;
                data.Resistance = resistance;

                res.Table_Resistances.InsertOnSubmit(data);
                res.SubmitChanges(); //submit changes

            }
            System.Windows.Forms.MessageBox.Show("Upload complete!");
        }
예제 #3
0
 partial void DeleteTable_Resistance(Table_Resistance instance);
예제 #4
0
 partial void UpdateTable_Resistance(Table_Resistance instance);
예제 #5
0
 partial void InsertTable_Resistance(Table_Resistance instance);
예제 #6
0
 partial void DeleteTable_Resistance(Table_Resistance instance);
예제 #7
0
 partial void UpdateTable_Resistance(Table_Resistance instance);
예제 #8
0
 partial void InsertTable_Resistance(Table_Resistance instance);