Beispiel #1
0
        private void StockListViewOnItemClick(object sender, AdapterView.ItemClickEventArgs itemClickEventArgs)
        {
            ScmStock selectedProduct   = this.ManageStockViewModel.ScmUnitsInStock[(int)itemClickEventArgs.Id];
            ScmStock previousSelection = this.ManageStockViewModel.SelectedProduct;

            // If we select a different product, clear any previous selection as we don't support multiple products yet!
            if (previousSelection != null && previousSelection.Name != selectedProduct.Name)
            {
                this.ManageStockViewModel.SelectedUnits.Clear();
            }

            this.ManageStockViewModel.SelectedProduct = selectedProduct;
            FragmentTransaction ft = FragmentManager.BeginTransaction();
            var fragment           = new FragmentSelectUnits();

            ft.Replace(Resource.Id.main_content, fragment, ManageStockView.MainContentFragmentTag);
            ft.Commit();

            this.ManageStockViewModel.ShowNoInternetAlert = false;
        }
Beispiel #2
0
        public bool Previous()
        {
            if (this.ManageStockViewModel.StockAction == ManageStockAction.Issue)
            {
                FragmentTransaction ft   = FragmentManager.BeginTransaction();
                Fragment            frag = new FragmentSelectUnits();
                ft.Replace(Resource.Id.main_content, frag, ManageStockView.MainContentFragmentTag);
                ft.Commit();

                this.ManageStockViewModel.DsrDetails.Remove(this._selectedUnits);
            }
            else
            {
                this.ManageStockViewModel.ShowCheckBoxOnConfirmationScreen(true);
                FragmentTransaction ft   = FragmentManager.BeginTransaction();
                Fragment            frag = new FragmentReasonsForReturn();
                ft.Replace(Resource.Id.main_content, frag, ManageStockView.MainContentFragmentTag);
                ft.Commit();
            }

            return(true);
        }