Beispiel #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     MyData_BindingSource.EndEdit();
     //endedit後 dataset.Table 就會更新,要把更新後的東西sync回DB
     this.MyData_TableAdapter.Update(this.database2DataSet.MY_DATA);
     this.MyData_TableAdapter.Fill(this.database2DataSet.MY_DATA);
     textBox1.Enabled = textBox2.Enabled = textBox3.Enabled = textBox4.Enabled = checkBox1.Enabled = false;
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            MyData_BindingSource.AddNew();

            textBox1.Enabled = textBox2.Enabled = textBox3.Enabled = textBox4.Enabled = checkBox1.Enabled = true;
        }