예제 #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            Labs th = new Labs();

            th.Owner = this;
            th.Show();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Labs main = this.Owner as Labs;

            if (main != null)
            {
                DataRow nRow = main.database11DataSet3.Tables[0].NewRow();
                int     rc   = main.dataGridView1.RowCount + 1;
                nRow[0] = rc;
                nRow[1] = textBox1.Text;
                nRow[2] = textBox2.Text;
                nRow[3] = textBox3.Text;
                main.database11DataSet3.Tables[0].Rows.Add(nRow);
                main.labsTableAdapter.Update(main.database11DataSet3.labs);
                main.database11DataSet3.Tables[0].AcceptChanges();
                main.dataGridView1.Refresh();
                textBox1.Text = "";
                textBox2.Text = "";
                textBox3.Text = "";
            }
        }