private void cmbCreateAim_Click(object sender, EventArgs e) { EditAimForm eaf = new EditAimForm(ref peopleManager); if (eaf.ShowDialog() == DialogResult.OK) { aimManager.updateAim(eaf.editedAim); UpdateDataOnGridViews(); } }
private void bCreateAim_Click(object sender, EventArgs e) { SaveState(); EditAimForm editAimForm = new EditAimForm(ref personManager); if (editAimForm.ShowDialog() == DialogResult.OK) { int newID = aimManager.addAim(editAimForm.editedAim); fillUIComponents(); LoadState(newID); } }
private void cmbEditAims_Click(object sender, EventArgs e) { List<GridViewRowInfo> rows = gridViewAims.SelectedRows.ToList(); int id = int.Parse(rows[0].Cells["columnID"].Value.ToString()); CAim aim = aimManager.getAim(id); EditAimForm eaf = new EditAimForm(aim, ref peopleManager); if (eaf.ShowDialog() == DialogResult.OK) { // find out, aim updated even without this function! aimManager.updateAim(eaf.editedAim); UpdateDataOnGridViews(); } }