Пример #1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ClassListAdd clad = new ClassListAdd();

            clad.ShowDialog();
            classListTableAdapter.Fill(schoolDataSet.ClassList);
            schoolDataSet.AcceptChanges();
            RefreshTable();
        }
Пример #2
0
        private void updateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var clt = new SchoolDataSet.ClassListDataTable();

            classListTableAdapter.FillBy(clt, Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[3].Value));
            object[] row  = clt.Rows[0].ItemArray;
            var      edit = new ClassListAdd(Convert.ToInt32(row[0]), Convert.ToInt32(row[1]), Convert.ToInt32(row[2]), Convert.ToByte(row[3]));

            edit.ShowDialog();
            classListTableAdapter.Fill(schoolDataSet.ClassList);
            schoolDataSet.AcceptChanges();
            RefreshTable();
        }