Exemplo n.º 1
0
        public void CreateIngredient()
        {
            WpfDrinkzy.IngredientServiceRef.Ingredient i = new WpfDrinkzy.IngredientServiceRef.Ingredient();

            i.Name    = txtIngName.Text;
            i.Procent = decimal.Parse(txtProcent.Text);

            ingredientServiceClient.createIngredient(i);
        }
Exemplo n.º 2
0
        public void UpdateIngredient()
        {
            WpfDrinkzy.IngredientServiceRef.Ingredient i = (WpfDrinkzy.IngredientServiceRef.Ingredient)IngList.SelectedItem;

            i.Name    = txtIngName.Text;
            i.Procent = decimal.Parse(txtProcent.Text);

            ingredientServiceClient.UpdateIngredient(i);
        }
Exemplo n.º 3
0
        public void AddIngredient()
        {
            Drink d = (Drink)DrinkList.SelectedItem;

            WpfDrinkzy.IngredientServiceRef.Ingredient i =
                (WpfDrinkzy.IngredientServiceRef.Ingredient)AllIngredientList.SelectedItem;

            DrinkClient.AddIngredientToDrink(i.ID, d);
            IngredientList.ItemsSource = DrinkClient.GetDrink(d.ID).Ingredients;
        }
Exemplo n.º 4
0
 public void DeleteIngredient()
 {
     WpfDrinkzy.IngredientServiceRef.Ingredient i = (WpfDrinkzy.IngredientServiceRef.Ingredient)IngList.SelectedItem;
     ingredientServiceClient.DeleteIngredient(i.ID);
 }