Exemplo n.º 1
0
        private async void DeleteItem()
        {
            AddRecipePageViewModel addRecipePageViewModel = AddRecipePageViewModel.GetInstance();

            addRecipePageViewModel.Codes2.Remove(this);
            addRecipePageViewModel.Refresh2();
        }
Exemplo n.º 2
0
        private async void AddOne()
        {
            AddRecipePageViewModel addRecipePageViewModel = AddRecipePageViewModel.GetInstance();

            addRecipePageViewModel.Codes2.Remove(this);
            this.Qty = this.Qty + 1;
            addRecipePageViewModel.Codes2.Add(this);
            addRecipePageViewModel.Refresh2();
        }
Exemplo n.º 3
0
        private async void AddItem()
        {
            AddRecipePageViewModel addRecipePageViewModel = AddRecipePageViewModel.GetInstance();

            this.Qty = 1;
            bool Bandera = true;

            foreach (var code in addRecipePageViewModel.Codes2)
            {
                if (code.Code == this.Code)
                {
                    Bandera = false;
                }
            }
            if (Bandera)
            {
                addRecipePageViewModel.Codes2.Add(this);
                addRecipePageViewModel.Refresh2();
            }
        }