Ejemplo n.º 1
0
 private void MSModifyProductButton_Click(object sender, EventArgs e)
 {
     if (Inventory.CurrProductIndex >= 0)
     {
         this.Hide();
         ModifyProductForm modprod = new ModifyProductForm();
         modprod.ShowDialog();
     }
     else
     {
         MessageBox.Show("There are no products to modify.", "Error");
     }
 }
Ejemplo n.º 2
0
 private void modifyProduct_Click(object sender, EventArgs e)
 {
     if (Inventory.products.Any())
     {
         int productSelected = Convert.ToInt32(productDataGridView.Rows[productDataGridView.CurrentCell.RowIndex].Cells[0].Value);//getting the integer value of the selected part's ID
         this.Hide();
         ModifyProductForm modifyProductScreen = new ModifyProductForm(productSelected);
         modifyProductScreen.ShowDialog();
     }
     else
     {
         MessageBox.Show("There are no products to modify.", "Error");
     }
 }