Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var add = new SubjectAdder();

            add.ShowDialog();
            subjectTableAdapter.Fill(schoolDataSet.Subject);
            schoolDataSet.AcceptChanges();
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            var cl = new SchoolDataSet.SubjectDataTable();

            subjectTableAdapter.FillBy(cl, Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value));
            object[] row  = cl.Rows[0].ItemArray;
            var      edit = new SubjectAdder(Convert.ToInt32(row[0]), Convert.ToString(row[1]));

            edit.ShowDialog();
            subjectTableAdapter.Fill(schoolDataSet.Subject);
            schoolDataSet.AcceptChanges();
        }