public async Task SearchAndPopulate() { Busy = true; var data = new PickDataStore(); var pickModelSearch = new PickModelSearch() { SearchFromLocationCode = _searchFromLocationCode, SearchBarcode = _searchBarcode, SearchDocumentNo = _searchDocumentNo, SearchProduct = _searchProduct }; try { var result = await data.GetItemAsync(pickModelSearch, "80"); if (result == null) { Busy = false; await _navigationService.DisplayAlert("Alert", "Store Pick Empty", "Ok"); } else { Busy = false; await _navigationService.PushAsync(new StorePickPage(_navigationService, pickModelSearch, (TaskModel)result.Data)); } } catch (Exception ex) { Busy = false; await _navigationService.DisplayAlert("Server.", ex.Message, "Ok"); } }
public StorePickViewModel(INavigationService navigationService, PickModelSearch modelSearch, TaskModel task) { _navigationService = navigationService; CurrentTask = task; _modelSearch = modelSearch; pickDataStore = new PickDataStore(); NextCommand = new Command(async() => await NextTask()); SkipCommand = new Command(async() => await SkipTask()); BackCommand = new Command(async() => await Back()); HoldCommand = new Command(async() => await HoldTask()); }
public FinePickViewModel(INavigationService navigationService, FinePickModelSearch modelSearch, GetNextTaskModel task) { _navigationService = navigationService; DataContext = task; _modelSearch = modelSearch; pickDataStore = new PickDataStore(); NextCommand = new Command(async() => await NextTask()); SkipCommand = new Command(async() => await SkipTask()); BackCommand = new Command(async() => await Back()); HoldCommand = new Command(async() => await HoldTask()); ContextData(); }