Exemple #1
0
        /// <summary>
        /// Go on to add a new ingredient
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddIngredient_Click(object sender, EventArgs e)
        {
            this.Close();
            frmAddProductIngredients frm = new frmAddProductIngredients();

            frm.ShowDialog();
        }
Exemple #2
0
 /// <summary>
 /// Update ingredient row
 /// </summary>
 /// <param name="e"></param>
 private void UpdateRow(DataGridViewCellEventArgs e)
 {
     try
     {
         //Move to update window
         long ingredientID = (long)dtgIngredients.Rows[e.RowIndex].Cells["IngredientID"].Value;
         this.Close();
         frmAddProductIngredients frm = new frmAddProductIngredients(cmbProductName.SelectedItem as ProductItem,
                                                                     ingredientID);
         frm.ShowDialog();
     }
     catch
     {
         MessageBox.Show("Unable to update ingredient");
     }
 }