private void add_Points_Click(object sender, EventArgs e) { var add = new PointsData(); add.ShowDialog(); pointsDistributionTableAdapter.Fill(schoolCourseDataSet.PointsDistribution); schoolCourseDataSet.AcceptChanges(); }
private void edit_Points_Click(object sender, EventArgs e) { var ds = new SchoolCourseDataSet.PointsDistributionDataTable(); pointsDistributionTableAdapter.FillBy(ds, Convert.ToInt32(pointsDataGridView.SelectedRows[0].Cells[0].Value)); object[] row = ds.Rows[0].ItemArray; var edt = new PointsData(Convert.ToInt32(row[0]), row[1].ToString(), Convert.ToInt32(row[2])); edt.ShowDialog(); pointsDistributionTableAdapter.Fill(schoolCourseDataSet.PointsDistribution); schoolCourseDataSet.AcceptChanges(); }