private void editBtn_Click(object sender, EventArgs e) { if (this.schedulePeriodGrid.SelectedRows.Count > 0) { var schedulePeriodId = (int)this.schedulePeriodGrid.SelectedRows[0].Cells["ID"].Value; var editSchedulePeriodForm = new EditSchedulePeriodForm(this, schedulePeriodId); editSchedulePeriodForm.ShowDialog(this); } }
private void addBtn_Click(object sender, EventArgs e) { var editSchedulePeriodForm = new EditSchedulePeriodForm(this); editSchedulePeriodForm.ShowDialog(this); }