예제 #1
0
        private void uploadManual_Click(object sender, EventArgs e)
        {
            var  boardId = textBox2.Text;
            char groupId = Convert.ToChar(textBox1.Text);

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

            data.GroupID              = groupId;
            data.BoardID              = boardId;
            data.DateTime             = DateTime.Now;
            data.MeasMaxOnTime        = Convert.ToSingle(textBox6.Text);
            data.MeasMinOnTime        = Convert.ToSingle(textBox4.Text);
            data.MeasureMaxResistance = Convert.ToSingle(textBox5.Text);
            data.MeasureMinResistance = Convert.ToSingle(textBox3.Text);

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

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

            data.GroupID = groupId;
            data.BoardID = boardId;
            data.DateTime = DateTime.Now;
            data.MeasMaxOnTime = Convert.ToSingle(textBox6.Text);
            data.MeasMinOnTime = Convert.ToSingle(textBox4.Text);
            data.MeasureMaxResistance = Convert.ToSingle(textBox5.Text);
            data.MeasureMinResistance = Convert.ToSingle(textBox3.Text);

            res.Table2s.InsertOnSubmit(data);
            res.SubmitChanges(); //submit changes
            System.Windows.Forms.MessageBox.Show("Upload complete!");
        }