示例#1
0
        private void EditRecipe(object obj)
        {
            IsIngredientEdited = false;
            IsRecipeEdited     = true;
            RecipeKey          = (int)SelectedRecipe.Row["RecipeKey"];
            RecipeName         = (string)SelectedRecipe.Row["RecipeName"];
            Description        = (string)SelectedRecipe.Row["Description"];
            Portion            = (double)SelectedRecipe.Row["Portion"];
            Quantity           = (double)SelectedRecipe.Row["Quantity"];

            OutputProduct = OutputProductsCollection?.FirstOrDefault(
                x => x.nKey == (int)SelectedRecipe.Row["ProductKey"]);
        }
示例#2
0
 private void EditPlan(object obj)
 {
     IsPlanEdited = true;
     //mPlanKey = (int)mSelectedPlan.Row["PlanKey"];
     //SelectedProduct = OutputProductsCollection.FirstOrDefault(
     //    x => x.nKey == (int)mSelectedPlan.Row["ProductKey"]);
     //Quantity = (double)mSelectedPlan.Row["rQuantity"];
     //Date = (DateTime)mSelectedPlan.Row["tDate"];
     mPlanKey        = mSelectedPlan.PlanKey;
     SelectedProduct = OutputProductsCollection.FirstOrDefault(
         x => x.nKey == mSelectedPlan.ProductKey);
     Quantity = mSelectedPlan.rQuantity;
     Date     = mSelectedPlan.tDate;
 }