Пример #1
0
 /// <summary>
 /// Обработчик нажатия кнопки добавления
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AddButton_Click(object sender, EventArgs e)
 {
     AddForm addForm = new AddForm(false);
     addForm.AddList = itemList;
     addForm.ShowDialog();
 }
Пример #2
0
 /// <summary>
 /// Обработчик нажатия кнопки изменить
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ModifyButton_Click(object sender, EventArgs e)
 {
     if (dataGridView.CurrentRow != null)
     {
         AddForm addForm = new AddForm(itemList[dataGridView.CurrentRow.Index], false);
         addForm.AddList = itemList;
         addForm.ShowDialog();
     }
 }