예제 #1
0
 private void _stockViewModel_AddIngredientRequested()
 {
     StockAddOrEditIngredientViewModel = new StockAddOrEditIngredientViewModel(_ingredientRepo, _supplierRepo);
     StockAddOrEditIngredientViewModel.AddOrEditIngredientRequested += AddIngredientViewModel_AddOrEditIngredientRequested;
     StockAddOrEditIngredientViewModel.AddSupplierRequested         += StockAddOrEditIngredientViewModel_AddSupplierRequested;
     StockAddOrEditIngredientViewModel.BackToStockRequested         += StockAddOrEditIngredientViewModel_BackToStockRequested;
     CurrentViewModel = StockAddOrEditIngredientViewModel;
 }
예제 #2
0
 private void _stockViewModel_StockEditIngredientRequested(Data.Ingredient ing)
 {
     Business.Ingredient busIng = new Business.Ingredient()
     {
         Amount = ing.Amount, BrandName = ing.BrandName, BuyPrice = ing.BuyPrice, ID = ing.Id, Name = ing.Name, SellPrice = ing.SellPrice, Supplier = ing.Supplier
     };
     StockAddOrEditIngredientViewModel =
         new StockAddOrEditIngredientViewModel(_ingredientRepo, _supplierRepo, busIng);
     StockAddOrEditIngredientViewModel.AddOrEditIngredientRequested +=
         AddIngredientViewModel_AddOrEditIngredientRequested;
     StockAddOrEditIngredientViewModel.AddSupplierRequested += StockAddOrEditIngredientViewModel_AddSupplierRequested;
     StockAddOrEditIngredientViewModel.BackToStockRequested += StockAddOrEditIngredientViewModel_BackToStockRequested;
     CurrentViewModel = StockAddOrEditIngredientViewModel;
 }