示例#1
0
文件: Form1.cs 项目: M-at-symbol/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 Table_2();

            //get information from textboxes
            data.GroupID           = groupId;
            data.BoardID           = boardId;
            data.DateTime          = DateTime.Now;
            data.MaxOnTime         = Convert.ToSingle(textBox6.Text);
            data.MinOnTime         = Convert.ToSingle(textBox4.Text);
            data.MaxTimeResistance = Convert.ToSingle(textBox5.Text);
            data.MinTimeResistance = Convert.ToSingle(textBox3.Text);

            res.Table_2s.InsertOnSubmit(data);
            res.SubmitChanges();                                      //submit changes
            System.Windows.Forms.MessageBox.Show("Upload complete!"); //Message uplod is complete
        }
示例#2
0
文件: Form1.cs 项目: M-at-symbol/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 Table_2();
            //get information from textboxes
            data.GroupID = groupId;
            data.BoardID = boardId;
            data.DateTime = DateTime.Now;
            data.MaxOnTime = Convert.ToSingle(textBox6.Text);
            data.MinOnTime = Convert.ToSingle(textBox4.Text);
            data.MaxTimeResistance = Convert.ToSingle(textBox5.Text);
            data.MinTimeResistance = Convert.ToSingle(textBox3.Text);

            res.Table_2s.InsertOnSubmit(data);
            res.SubmitChanges(); //submit changes
            System.Windows.Forms.MessageBox.Show("Upload complete!"); //Message uplod is complete
        }
示例#3
0
 partial void DeleteTable_2(Table_2 instance);
示例#4
0
 partial void UpdateTable_2(Table_2 instance);
示例#5
0
 partial void InsertTable_2(Table_2 instance);
示例#6
0
 partial void DeleteTable_2(Table_2 instance);
示例#7
0
 partial void UpdateTable_2(Table_2 instance);
示例#8
0
 partial void InsertTable_2(Table_2 instance);