Exemple #1
0
        private void add_Activity_Click(object sender, EventArgs e)
        {
            var add = new AdditionalActivityData();

            add.ShowDialog();
            additionalActivityTableAdapter.Fill(schoolCourseDataSet.AdditionalActivity);
            schoolCourseDataSet.AcceptChanges();
        }
Exemple #2
0
        private void edit_Activity_Click(object sender, EventArgs e)
        {
            var ds = new SchoolCourseDataSet.AdditionalActivityDataTable();

            additionalActivityTableAdapter.FillBy(ds, Convert.ToInt32(activityDataGridView.SelectedRows[0].Cells[0].Value));
            object[] row = ds.Rows[0].ItemArray;
            var      edt = new AdditionalActivityData(Convert.ToInt32(row[0]),
                                                      row[1].ToString(),
                                                      Convert.ToDateTime(row[2]));

            edt.ShowDialog();
            additionalActivityTableAdapter.Fill(schoolCourseDataSet.AdditionalActivity);
            schoolCourseDataSet.AcceptChanges();
        }