Пример #1
0
 private void cmbCreateItem_Click(object sender, EventArgs e)
 {
     EditItemForm eif = new EditItemForm(ref peopleManager);
     if (eif.ShowDialog() == DialogResult.OK)
     {
         itemManager.addItem(eif.editedItem);
         UpdateDataOnGridViews();
     }
 }
Пример #2
0
 private void bCreateItem_Click(object sender, EventArgs e)
 {
     SaveState();
     EditItemForm editItemForm = new EditItemForm(ref personManager);
     if (editItemForm.ShowDialog() == DialogResult.OK)
     {
         int newID = itemManager.addItem(editItemForm.editedItem);
         fillUIComponents();
         LoadState(newID);
     }
 }
Пример #3
0
        private void bCreateItem_Click(object sender, EventArgs e)
        {
            SaveState();
            EditItemForm editItemForm = new EditItemForm(ref personManager);

            if (editItemForm.ShowDialog() == DialogResult.OK)
            {
                int newID = itemManager.addItem(editItemForm.editedItem);
                fillUIComponents();
                LoadState(newID);
            }
        }
Пример #4
0
 private void cmbEditItems_Click(object sender, EventArgs e)
 {
     List<GridViewRowInfo> rows = gridViewItems.SelectedRows.ToList();
     int id = int.Parse(rows[0].Cells["columnID"].Value.ToString());
     CItem item = itemManager.getItem(id);
     EditItemForm eif = new EditItemForm(item, ref peopleManager);
     if (eif.ShowDialog() == DialogResult.OK)
     {
         itemManager.updateItem(eif.editedItem);
         UpdateDataOnGridViews();
     }
 }