Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FieldDataService update for CollectionEventProperties

  • Loading branch information...
commit d070501a14dcca418693bd8eb90f6f8bbc687c5f 1 parent d709cf0
@rollingthunder rollingthunder authored
View
1  DiversityPhone/Services/IFieldDataService.cs
@@ -34,6 +34,7 @@ public interface IFieldDataService
void updateEventKey(int oldEventKey, int newEventKey);
IList<CollectionEventProperty> getPropertiesForEvent(Event ev);
+ CollectionEventProperty getPropertyByID(int eventId, int propertyId);
void addOrUpdateCollectionEventProperty(CollectionEventProperty cep);
IList<Specimen> getAllSpecimen();
View
11 DiversityPhone/Services/OfflineStorage.cs
@@ -283,14 +283,21 @@ public void deleteEvent(Event toDeleteEv)
public IList<CollectionEventProperty> getPropertiesForEvent(Event ev)
{
- return cachedQuery(CollectionEventProperty.Operations,
- ctx =>
+ return uncachedQuery(ctx =>
from cep in ctx.CollectionEventProperties
where cep.EventID == ev.EventID
select cep
);
}
+ public CollectionEventProperty getPropertyByID(int eventId, int propertyId)
+ {
+ return singletonQuery(ctx => from cep in ctx.CollectionEventProperties
+ where cep.EventID == eventId &&
+ cep.PropertyID == propertyId
+ select cep);
+ }
+
public void addOrUpdateCollectionEventProperty(CollectionEventProperty cep)
{
Event ev = this.getEventByID(cep.EventID);
Please sign in to comment.
Something went wrong with that request. Please try again.