public LogObservationsViewModel(bool IsReload, LotAndCommandObservation lotAndCommandData, LogItem logitem) { if (IsReload) { ApiSrv = new Services.ApiService(ApiConsult.ApiMenuB); this.LogItem = logitem; this.LotAndCommandData = lotAndCommandData; SelectedObservation = new ObservationItem(); GetInitialData(); //GetFakeData(); } }
private void ImageButtonAction_8_Clicked(object sender, EventArgs e) { var imageButton = (ImageButton)sender; var commandItem = imageButton.CommandParameter as CommandItem; if (commandItem != null) { LotAndCommandObservation lotAndCommandObservation = new LotAndCommandObservation() { HasData = true, IdInstance = commandItem.InstanceItem.IdInstance, IdLot = commandItem.IdLot, IdCommand = commandItem.IdCommand }; MainViewModel.GetInstance().LogObservations = new LogObservationsViewModel(true, lotAndCommandObservation, commandItem.InstanceItem.LogItem); Application.Current.MainPage.Navigation.PushAsync(new LogObservationsPage()); } }