示例#1
0
 private void cmbCreateAim_Click(object sender, EventArgs e)
 {
     EditAimForm eaf = new EditAimForm(ref peopleManager);
     if (eaf.ShowDialog() == DialogResult.OK)
     {
         aimManager.updateAim(eaf.editedAim);
         UpdateDataOnGridViews();
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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);
            }
        }
示例#4
0
 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();
     }
 }