private void buttonMajorAdd_Click(object sender, EventArgs e) { FormMajorDetail formMD = new FormMajorDetail(); formMD.ShowDialog(); refreshDataViewMajor(); }
private void buttonMajorEdit_Click(object sender, EventArgs e) { if (dataViewMajor.SelectedRows.Count > 0) { int majorID = Convert.ToInt16(dataViewMajor.SelectedRows[0].Cells[0].Value); Major updateMajor = Major.GetMajor(majorID); FormMajorDetail formMD = new FormMajorDetail(updateMajor, "edit"); formMD.ShowDialog(); refreshDataViewMajor(); } }