//Obtener un punto de medicion public ObservableCollection<RegistroModel> GetPuntoMedicion(long idPuntoMedicion) { ObservableCollection<RegistroModel> oc = new ObservableCollection<RegistroModel>(); try { SyncRepository sync = new SyncRepository(); long fechaActual = sync.GetCurrentDate(); using (var entity = new db_SeguimientoProtocolo_r2Entities()) { var res = (from o in entity.CI_REGISTRO where o.IdPuntoMedicion == idPuntoMedicion select o).ToList(); if (res != null && res.Count > 0) { res.ForEach(row => { oc.Add(new RegistroModel() { IdRegistro = row.IdRegistro, IdPuntoMedicion = row.IdPuntoMedicion, FechaCaptura = row.FechaCaptura, HoraRegistro = row.HoraRegistro, DiaRegistro = row.DiaRegistro, Valor = row.Valor, AccionActual = row.AccionActual, IsActive = row.IsActive, IsModified = row.IsModified, LastModifiedDate = row.LastModifiedDate, IdCondicion = row.IdCondicion, ServerLastModifiedDate = row.ServerLastModifiedDate, FechaNumerica = row.FechaNumerica }); }); }; } } catch (Exception ex) { } return oc; }