Exemplo n.º 1
0
        private void EditIngredient(object ingredient)
        {
            dbActions = new DbActions();

            if (selectedIngredient != null && !string.IsNullOrEmpty(selectedIngredient.name) && !string.IsNullOrWhiteSpace(selectedIngredient.name))
            {
                if (dbActions.EditIngredient(new CookBookData.Model.Ingredient {
                    Id = selectedIngredient.Id, name = selectedIngredient.name
                }))
                {
                    MessageBox.Show("Ingredient updated", "Ingredient updated", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
                }
            }
        }