private void add_Rate_Click(object sender, EventArgs e) { var add = new PaymentRate(); add.ShowDialog(); paymentRateTableAdapter.Fill(schoolCourseDataSet.PaymentRate); schoolCourseDataSet.AcceptChanges(); }
private void edit_Rate_Click(object sender, EventArgs e) { var ds = new SchoolCourseDataSet.PaymentRateDataTable(); paymentRateTableAdapter.FillBy(ds, Convert.ToInt32(rateDataGridView.SelectedRows[0].Cells[0].Value)); object[] row = ds.Rows[0].ItemArray; var edt = new PaymentRate(Convert.ToInt32(row[0]), row[1].ToString(), Convert.ToInt32(row[2])); edt.ShowDialog(); paymentRateTableAdapter.Fill(schoolCourseDataSet.PaymentRate); schoolCourseDataSet.AcceptChanges(); }