private void ExamenesPendientes_Loaded(object sender, RoutedEventArgs e) { if (!string.IsNullOrWhiteSpace(this.ViewModel.IdMuestra)) { StoreProceduresOps.PRO_ConsultaEstudioIdenMuestraAsync( this.ViewModel.IdMuestra, (ss, ee) => { if (ee.Cancelled) { } else if (ee.Error != null) { } else { var results = ee.Result as List <PRO_ConsultaEstudioIdenMuestra_Result>; if (results != null) { this.ViewModel.Pendientes.Clear(); foreach (var result in results) { this.ViewModel.Pendientes.Add(result); } } } }); } }
public void LoadObservations() { this.Observations.Clear(); StoreProceduresOps.GetTechnicianObsAsync(Tuple.Create(this.SampleId, this.SourceCode), (sender, args) => { if (args.Cancelled) { } else if (args.Error != null) { } else { var observacionResults = args.Result as List <PRO_EstudioObservacion_Result>; if (observacionResults != null) { foreach (PRO_EstudioObservacion_Result proEstudioObservacionResult in observacionResults) { this.Observations.Add(proEstudioObservacionResult); } } } }); }
private void AnulaCommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) { var image = e.OriginalSource as Image; if (image != null) { var muestraResult = image.DataContext as PRO_ConsultaEstudioIdenMuestra_Result; if (muestraResult != null) { if (MessageBox.Show("Desea Anular este Resultado?", "Anular Resultado", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes) { StoreProceduresOps.PRO_CapturaManualResultadoAnulaAsync( new CapturaManualAnulaParameters { NoResultado = muestraResult.NoResultado, CodPesoAsisten = this.ViewModel.InfoProfesional.Codigo }, (ss, ee) => { this.ViewModel.Reload = true; this.DialogResult = true; }); } } } }
partial void OnNoResultadoChanged() { this.ReportPropertyChanged("AnularVisible"); if (!string.IsNullOrWhiteSpace(this.NoResultado)) { this.Resultados.Clear(); StoreProceduresOps.PRO_ConsultaResultadoEstudioAsync( this.NoResultado, (s, e) => { if (e.Cancelled) { } else if (e.Error != null) { } else { var consultaResultadoEstudioResults = e.Result as List <PRO_ConsultaResultadoEstudio_Result>; if (consultaResultadoEstudioResults != null) { foreach (var proConsultaResultadoEstudioResult in consultaResultadoEstudioResults) { this.Resultados.Add(proConsultaResultadoEstudioResult); } } } }); } }
public void Consultar() { StoreProceduresOps.PRO_CapturaManualHistoricoAsync( this.Parametros, (s, e) => { this.Historicos.Clear(); if (e.Cancelled) { } else if (e.Error != null) { } else { var results = e.Result as List <PRO_CapturaManualHistorico_Result>; if (results != null) { foreach (var result in results) { this.Historicos.Add(result); } } } if (this.Historicos.Count > 0) { Application.Current.Dispatcher.BeginInvoke(new Action(this.EvaluarLista)); } }); }
public void DoTracking() { var sampleParameters = Tuple.Create(this.SampleId, this.OriginCode, this.Analyte); StoreProceduresOps.GetSampleTracking(sampleParameters, (sender, args) => { if (args.Cancelled) { } else if (args.Error != null) { } else { var trackingItems = args.Result as List <TrackingItem>; if (trackingItems != null) { foreach (TrackingItem trackingItem in trackingItems) { this.TrackingItems.Add(trackingItem); } } } }); }
public PRO_CargaCapturaCampoLargo_Result() { StoreProceduresOps.GetDatoLargoSugestions( this, (s, e) => { if (e.Cancelled) { } else if (e.Error != null) { } else { var sugerenciasAutoTextos = e.Result as List <SugerenciasAutoTexto>; if (sugerenciasAutoTextos != null) { foreach (var sugerenciasAutoTexto in sugerenciasAutoTextos) { this.SuggestionsDatoLargo.Add(sugerenciasAutoTexto); } } } }); }
public void UpdateFormula() { if (this.HasFormula) { StoreProceduresOps.CargaFormulaAsync( new CapturaManualFormulaParameters { CodigoFuente = this.CodigoFuente, IdMuestra = this.IdMuestra }, (sender, args) => { if (args.Cancelled) { } else if (args.Error != null) { } else { var resultados = args.Result as List <PRO_CargaCapturaFormula_Result>; if (resultados != null) { foreach (var proCargaCapturaFormulaResult in resultados) { foreach (var complexObject in this.Analitos) { var analito = complexObject as PRO_CargaCapturaCuatroCampos_Result; if (analito != null) { if (proCargaCapturaFormulaResult.Analito == analito.Analito) { analito.Dato = proCargaCapturaFormulaResult.Dato; } } var analito2 = complexObject as DatosEnColumnas; if (analito2 != null) { if (proCargaCapturaFormulaResult.Analito == analito2.Columna0.Analito) { analito2.Columna0.Dato = proCargaCapturaFormulaResult.Dato; } if (proCargaCapturaFormulaResult.Analito == analito2.Columna1.Analito) { analito2.Columna1.Dato = proCargaCapturaFormulaResult.Dato; } if (proCargaCapturaFormulaResult.Analito == analito2.Columna1.Analito) { analito2.Columna1.Dato = proCargaCapturaFormulaResult.Dato; } } } } } } }); } }
public PRO_CargaCapturaCuatroCampos_Result() { this.Loading = true; this.Suggestions.CollectionChanged += (ss, oo) => this.ReportPropertyChanged("Suggestions"); StoreProceduresOps.GetSugestions(this); StoreProceduresOps.GetAlerts(this); StoreProceduresOps.GetDatoLargoSugestions( this, (s, e) => { if (e.Cancelled) { } else if (e.Error != null) { } else { var sugerenciasAutoTextos = e.Result as List <SugerenciasAutoTexto>; if (sugerenciasAutoTextos != null) { foreach (var sugerenciasAutoTexto in sugerenciasAutoTextos) { System.Windows.Application.Current.Dispatcher.Invoke( (Action)(() => { this.SuggestionsDatoLargo.Add(sugerenciasAutoTexto); })); } } } }); StoreProceduresOps.GetDatoLargoMultiSugestions( this, (s, e) => { if (e.Cancelled) { } else if (e.Error != null) { } else { var sugerenciasAutoTextos = e.Result as List <SugerenciasAutoTexto>; if (sugerenciasAutoTextos != null) { foreach (var sugerenciasAutoTexto in sugerenciasAutoTextos) { var texto = sugerenciasAutoTexto; System.Windows.Application.Current.Dispatcher.Invoke((Action)(() => { this.SuggestionsMultiDatoLargo.Add(texto); })); } } } }); }
private void SaveNewObservationAction(object parameter) { if (!string.IsNullOrWhiteSpace(this.newObservation)) { StoreProceduresOps.SaveTechnicianObsAsync(Tuple.Create(this.SampleId, this.SourceCode, this.User, this.NewObservation), (sender, args) => { if (args.Cancelled) { } else if (args.Error != null) { } else { this.NewObservation = string.Empty; this.LoadObservations(); } }); } }
private void LoadPanels() { this.Panels.Clear(); if (this.Opcional.GetValueOrDefault(false)) { StoreProceduresOps.LoadPanelsAsync( new CapturaManualAnalitoParameters { CodigoFuente = this.CodigoFuente }, (s, e) => { if (e.Cancelled) { } else if (e.Error != null) { Trace.TraceError(e.Error.Message); } else { Application.Current.Dispatcher.Invoke( (Action)(() => { var panelsRaw = e.Result as IList <PRO_CargaCapturaPanelOpcional_Result>; if (panelsRaw != null) { foreach (var panelRaw in panelsRaw) { this.Panels.Add(panelRaw); } } })); } }); } }
public PRO_CargaCapturaCuatroCamposDosBloques_Result() { this.Loading = true; StoreProceduresOps.GetSugestions(this); StoreProceduresOps.GetAlerts(this); }