Example #1
0
 private void EditProductButton_Click(object sender, EventArgs e)
 {
     try
     {
         ProductWorkingForm productWorkingForm = new ProductWorkingForm(productsList.FirstOrDefault(x => x.id == (int)ProductDataGridView.CurrentRow.Cells[0].Value));
         productWorkingForm.ShowDialog();
     }
     catch (Exception)
     {
         MessageBox.Show("Выберите товар для редактирования", "Ошибка");
     }
 }
Example #2
0
        private void AddProductButton_Click(object sender, EventArgs e)
        {
            ProductWorkingForm productWorkingForm = new ProductWorkingForm();

            productWorkingForm.ShowDialog();
        }