/// <summary>
    /// Binds the controls.
    /// </summary>
    private void bindControls()
    {
        SiteVisit siteVisit = this.UserState.SiteVisit;

        this.SiteVisited.Text       = GlobalMap.SiteList.First(x => x.Id == siteVisit.LocationId).Name;
        this.SiteVisitObserver.Text = GlobalMap.PersonList.First(x => x.Id == siteVisit.ObserverId).FullName;
        this.SiteVisitRecorder.Text = GlobalMap.PersonList.First(x => x.Id == siteVisit.RecorderId).FullName;

        SiteCondition startConditions = siteVisit.StartConditions;

        this.StartTime.Text        = siteVisit.StartTimeStamp.ToString();
        this.StartSky.Text         = startConditions.SkyText;
        this.StartWind.Text        = startConditions.WindText;
        this.StartTemperature.Text = startConditions.Temperature.ToString();

        SiteCondition endConditions = siteVisit.EndConditions;

        this.EndTime.Text        = siteVisit.EndTimeStamp.ToString();
        this.EndSky.Text         = endConditions.SkyText;
        this.EndTemperature.Text = endConditions.Temperature.ToString();
        this.EndWind.Text        = endConditions.WindText;

        this.PointSurveyList.DataSource = siteVisit.PointSurveys.OrderBy(x => x.StartTimeStamp);
        this.PointSurveyList.DataBind();

        this.PointSurveyObservationList.DataSource = ReviewObservation.GetReviewList(this.UserState, this.GlobalMap);
        this.PointSurveyObservationList.DataBind();

        this.SupplementalList.DataSource = ReviewSupplemental.GetReviewSupplementalList(this.UserState, this.GlobalMap);
        this.SupplementalList.DataBind();
    }
Example #2
0
        public static bool SaveVisitorInfo()
        {
            UKareEntities db            = new UKareEntities();
            string        CurrentUserIp = GetUser_IP();
            //HttpContext.Current.Request.UserHostAddress;

            SiteVisit vister = db.SiteVisits.Where(p => p.IPaddress == CurrentUserIp && EntityFunctions.TruncateTime(p.LastVisitedDate) == EntityFunctions.TruncateTime(DateTime.Now)).FirstOrDefault();

            if (vister != null)
            {
                vister.VisitCount      = vister.VisitCount + 1;
                vister.LastVisitedDate = DateTime.Now;
                db.SaveChanges();
            }
            else
            {
                vister                 = new SiteVisit();
                vister.IPaddress       = CurrentUserIp;
                vister.LastVisitedDate = DateTime.Now;
                vister.VisitCount      = 1;
                db.SiteVisits.Add(vister);
                db.SaveChanges();
            }

            CurrentUserIp = string.Empty;
            vister        = null;
            db.Dispose();
            return(true);
        }
Example #3
0
        private SiteVisit MapViewModelToBusinessObject(ISiteConditionsView view)
        {
            var visit = UserState.SiteVisit ?? SiteVisit.CreateNewSiteVisit(view.SiteVisited.ToGuid());

            visit.ObserverId = view.Observer.ToGuid();
            visit.RecorderId = view.Recorder.ToGuid();

            visit.EndConditions.Sky         = view.EndSky.ToByte();
            visit.EndConditions.Temperature = new Temperature()
            {
                Units = view.EndUnit,
                Value = view.EndTemp.ToInt()
            };
            visit.EndConditions.Wind = view.EndWind.ToByte();
            visit.EndTimeStamp       = view.VisitDate.ToDateTime(view.EndTime);
            //visit.EndConditions.SiteVisitId;


            visit.StartConditions.Sky         = view.StartSky.ToByte();
            visit.StartConditions.Temperature = new Temperature()
            {
                Units = view.StartUnit,
                Value = view.StartTemp.ToInt()
            };
            visit.StartConditions.Wind = view.StartWind.ToByte();
            visit.StartTimeStamp       = view.VisitDate.ToDateTime(view.StartTime);

            return(visit);
        }
Example #4
0
        private void DeleteExistingAttachment(LocationDataServiceResponse locationData, Attachment existingAttachment)
        {
            if (!Context.DeleteExistingAttachments)
            {
                return;
            }

            var match = AttachmentUrlRegex.Match(existingAttachment.Url);

            if (!match.Success)
            {
                throw new ExpectedException($"Can't decode attachment ID from '{existingAttachment.Url}'");
            }

            var attachmentId = match.Groups["attachmentId"].Value;

            ++DeletedAttachments;

            LogAction($"Deleting existing attachment '{existingAttachment.FileName}' (uploaded {existingAttachment.DateUploaded:O} from '{locationData.Identifier}' ...");

            if (Context.DryRun)
            {
                return;
            }

            SiteVisit.Delete(new DeleteAttachmentById {
                Id = attachmentId
            });
        }
Example #5
0
        private void GivenSiteVisitStoredInUserSession(Guid endConditionId, Guid siteVisitId, byte endSky, string endTempUnit,
                                                       int endTemp, byte endWind, DateTime endDateTime, Guid locationid, Guid observerId, Guid recorderId,
                                                       DateTime startDateTime, Guid startConditionId, byte startSky, string startTempUnit, int startTemp)
        {
            var siteVisit = new SiteVisit
            {
                EndConditions = new SiteCondition
                {
                    Id          = endConditionId,
                    SiteVisitId = siteVisitId,
                    Sky         = endSky,
                    Temperature = new Temperature {
                        Units = endTempUnit, Value = endTemp
                    },
                    Wind = endWind
                },
                EndTimeStamp    = endDateTime,
                Id              = siteVisitId,
                LocationId      = locationid,
                ObserverId      = observerId,
                RecorderId      = recorderId,
                StartTimeStamp  = startDateTime,
                StartConditions = new SiteCondition
                {
                    Id          = startConditionId,
                    SiteVisitId = siteVisitId,
                    Sky         = startSky,
                    Temperature = new Temperature {
                        Units = startTempUnit, Value = startTemp
                    }
                }
            };

            UserStateMock.SetupGet(x => x.SiteVisit).Returns(siteVisit);
        }
Example #6
0
        public void t_FlattenedDataEntryList()
        {
            SiteVisit target = new SiteVisit();

            List <FiftyMeterPointObservation> observations = new List <FiftyMeterPointObservation>()
            {
                new PointCountBeyond50()
                {
                    SpeciesCode = DbTestHelper.SPECIES_1_CODE
                },
                new PointCountWithin50()
                {
                    SpeciesCode = DbTestHelper.SPECIES_2_CODE
                }
            };

            safnet.iba.Business.Entities.Moles.MFiftyMeterPointSurvey.AllInstances.ObservationsGet = (FiftyMeterPointSurvey survey) =>
            {
                return(observations);
            };
            target.PointSurveys.Add(new FiftyMeterPointSurvey());


            List <FiftyMeterDataEntry> actual;

            actual = target.FlattenedDataEntryList;

            Assert.AreEqual(1, actual.Count, "wrong count");
        }
Example #7
0
        public void t_Comments()
        {
            SiteVisit target   = new SiteVisit();
            string    expected = "these are some comments";
            string    actual;

            target.Comments = expected;
            actual          = target.Comments;
            Assert.AreEqual(expected, actual);
        }
        private async Task AddNewSiteDateVisitAsync(DateTime currentDate)
        {
            SiteVisit visit = new SiteVisit
            {
                Date   = currentDate.Date,
                Visits = 1
            };

            this.db.Visits.Add(visit);
            await this.db.SaveChangesAsync();
        }
        public void SaveSiteConditions(SiteVisit visit)
        {
            if (visit == null)
            {
                throw new ArgumentNullException("visit");
            }

            SiteVisitMapper.Insert(visit);
            ConditionsMapper.Insert(visit.StartConditions);
            ConditionsMapper.Insert(visit.EndConditions);
        }
Example #10
0
 public static TripLogModel Create(SiteVisit visit)
 => new TripLogModel
 {
     Date      = visit.Visited,
     StateId   = visit.State.Id,
     StateName = visit.State.Name,
     County    = visit.County,
     SiteId    = visit.Site.Id,
     SiteName  = visit.Site.Name,
     Visitors  = visit.Visitors
 };
Example #11
0
        public void t_WeekNumber_Dec31()
        {
            SiteVisit target = new SiteVisit();

            target.StartTimeStamp = new DateTime(2010, 12, 31);

            int expected = 53;
            int actual   = target.WeekNumber;

            Assert.AreEqual(expected, actual, "Week number not accurate");
        }
Example #12
0
        public void t_ObserverId()
        {
            SiteVisit target   = new SiteVisit();
            Guid      expected = LookupConstants.ObservationTypeParent;

            Guid actual;

            target.ObserverId = expected;
            actual            = target.ObserverId;
            Assert.AreEqual(expected, actual);
        }
Example #13
0
        public void t_RecorderId()
        {
            SiteVisit target   = new SiteVisit();
            Guid      expected = LookupConstants.LocationTypeSite;

            Guid actual;

            target.RecorderId = expected;
            actual            = target.RecorderId;
            Assert.AreEqual(expected, actual);
        }
Example #14
0
        public async Task LogRequest(HttpContext httpContext)
        {
            var siteVisit = new SiteVisit
            {
                Url       = httpContext.Request.Path,
                IPAddress = httpContext.Connection.RemoteIpAddress.ToString(),
                DateTime  = DateTime.Now
            };

            context.SiteVisits.Add(siteVisit);
            await context.SaveChangesAsync();
        }
Example #15
0
        public void t_CreateNewSiteVisit()
        {
            safnet.iba.Business.Entities.Moles.MSafnetBaseEntity.AllInstances.SetNewId = (SafnetBaseEntity entity) => { return(entity.Id = LookupConstants.LocationTypeParent); };

            Guid siteId = LookupConstants.LocationTypePoint;

            SiteVisit actual = SiteVisit.CreateNewSiteVisit(siteId);

            Assert.IsNotNull(actual, "object is null");
            Assert.AreEqual(LookupConstants.LocationTypeParent, actual.Id, "ID not assigned");
            Assert.AreEqual(siteId, actual.LocationId, "LocationId not assigned");
        }
        private static void ValidateCondition(IEnumerable <SiteCondition> results, Guid?expectedId, int expectedTemp, string expectedScale,
                                              byte expectedWind, byte expectedSky, SiteVisit visit, string condition)
        {
            var actual = results.FirstOrDefault(x => x.Id == expectedId);

            Assert.IsNotNull(actual, condition + " condition not saved in SiteVisit");

            Assert.AreEqual(expectedTemp, actual.Temperature, condition + " Temperature");
            Assert.AreEqual(expectedScale, actual.Scale, condition + " Scale");
            Assert.AreEqual(expectedWind, actual.Wind, condition + " Wind");
            Assert.AreEqual(expectedSky, actual.Sky, condition + " Sky");
            Assert.AreEqual(visit.Id, actual.SiteVisitId, condition + " SiteVisitId");
        }
Example #17
0
 private static void validateObjectEquality(SiteVisit siteVisit, SiteVisit_ado adoSiteVisit)
 {
     Assert.IsNotNull(adoSiteVisit, "There is no SiteVisit with the ID to test for");
     Assert.AreEqual(TestHelper.TestString(siteVisit.EndTimeStamp.Value), TestHelper.TestString(adoSiteVisit.EndTime), "EndTimeStamp");
     Assert.AreEqual(siteVisit.Id, adoSiteVisit.EventId, "SiteVisitId");
     Assert.AreEqual(siteVisit.IsDataEntryComplete, adoSiteVisit.IsDataEntryComplete, "IsDataEntryComplete");
     Assert.AreEqual(siteVisit.LocationId, adoSiteVisit.LocationId, "LocationId");
     Assert.AreEqual(siteVisit.ObserverId, adoSiteVisit.ObserverId, "ObserverId");
     Assert.AreEqual(siteVisit.RecorderId, adoSiteVisit.RecorderId, "RecorderId");
     Assert.AreEqual(TestHelper.TestString(siteVisit.StartTimeStamp.Value), TestHelper.TestString(adoSiteVisit.StartTime), "StartTimeStamp");
     Assert.AreEqual(siteVisit.EndConditions.Id, (adoSiteVisit.EndConditionId.HasValue) ? adoSiteVisit.EndConditionId.Value : Guid.Empty, "EndConditions");
     Assert.AreEqual(siteVisit.StartConditions.Id, adoSiteVisit.StartConditionId, "StartConditions");
     Assert.AreEqual(siteVisit.Comments, adoSiteVisit.Comments, "Comments");
 }
Example #18
0
        public void t_EndConditions()
        {
            SiteVisit     target   = new SiteVisit();
            SiteCondition expected = new SiteCondition()
            {
                Sky = 0
            };

            SiteCondition actual;

            target.EndConditions = expected;
            actual = target.EndConditions;
            Assert.AreEqual(expected, actual);
        }
        private static SiteVisit Load(IDataReader reader)
        {
            SiteVisit visit = new SiteVisit();

            EventBaseMapper.Load(reader, visit);

            visit.ObserverId          = reader.GetGuidFromName("ObserverId");
            visit.RecorderId          = reader.GetGuidFromName("RecorderId");
            visit.EndConditions.Id    = reader.GetGuidFromName("EndConditionId");
            visit.StartConditions.Id  = reader.GetGuidFromName("StartConditionId");
            visit.Comments            = reader.GetStringFromName("Comments");
            visit.IsDataEntryComplete = reader.GetBoolFromName("IsDataEntryComplete");

            return(visit);
        }
        public void t_CreateSaveParameters_SiteVisit_NullEndTimeStamp()
        {
            SiteVisit survey = new SiteVisit()
            {
                EndTimeStamp    = null,
                Id              = TestHelper.TestGuid1,
                LocationId      = TestHelper.TestGuid2,
                ObserverId      = TestHelper.TestGuid4,
                RecorderId      = TestHelper.TestGuid3,
                StartConditions = new SiteCondition(),
                StartTimeStamp  = DateTime.Now
            };

            EventBaseMapper.CreateSaveParameters(survey);
        }
        /// <summary>
        /// Saves the specified  <see cref="SiteCondition"/> object.
        /// </summary>
        /// <param name="visit">The SiteConditions object to save.</param>
        private static void save(SiteVisit visit)
        {
            List <QueryParameter> queryList = EventBaseMapper.CreateSaveParameters(visit);

            queryList.AddRange(new List <QueryParameter>()
            {
                new QueryParameter("ObserverId", visit.ObserverId),
                new QueryParameter("RecorderId", visit.RecorderId),
                new QueryParameter("StartConditionId", visit.StartConditions.Id),
                new QueryParameter("EndConditionId", visit.EndConditions.Id),
                new QueryParameter("Comments", visit.Comments),
                new QueryParameter("IsDataEntryComplete", visit.IsDataEntryComplete),
            });
            BaseMapper.SaveObject(visit, queryList);
        }
 public void Save(SiteVisit visit)
 {
     if (visit.SiteId <= 0)
     {
         throw new Exception("visit site id missing");
     }
     if (visit.Id <= 0)
     {
         Add(visit);
     }
     else
     {
         _connection.Update(visit);
     }
 }
        public async Task AddVisitAsync()
        {
            var currentDate = DateTime.Today;

            SiteVisit siteVisit = await this.GetCurrentDateVisits(currentDate);

            if (siteVisit == null)
            {
                await this.AddNewSiteDateVisitAsync(currentDate);
            }
            else
            {
                siteVisit.Visits++;
                await this.db.SaveChangesAsync();
            }
        }
Example #24
0
        public void t_SiteVisit_Save_Insert()
        {
            SiteVisit toInsert = new SiteVisit()
            {
                Id            = TestHelper.TestGuid1,
                EndConditions = new SiteCondition()
                {
                    Id          = TestHelper.TestGuid1,
                    SiteVisitId = TestHelper.TestGuid1,
                    Sky         = 0,
                    Temperature = new Business.DataTypes.Temperature()
                    {
                        Units = "C", Value = 20
                    },
                    Wind = 2
                },
                EndTimeStamp        = DateTime.Now,
                IsDataEntryComplete = true,
                LocationId          = TestHelper.TestGuid4,
                ObserverId          = TestHelper.TestGuid3,
                RecorderId          = TestHelper.TestGuid2,
                StartConditions     = new SiteCondition()
                {
                    Id          = TestHelper.TestGuid2,
                    SiteVisitId = TestHelper.TestGuid1,
                    Sky         = 1,
                    Temperature = new Business.DataTypes.Temperature()
                    {
                        Units = "C", Value = 23
                    },
                    Wind = 2
                },
                StartTimeStamp = DateTime.Now.AddHours(-2),
                Comments       = "asdf asdfa sdf asdfasdfasdf"
            };

            SiteVisitMapper.Insert(toInsert);

            using (IbaUnitTestEntities iba = new IbaUnitTestEntities())
            {
                var SiteVisitQuery = from SiteVisits in iba.SiteVisit_ado1 select SiteVisits;
                Assert.IsNotNull(SiteVisitQuery, "Query result is null");
                Assert.AreEqual(1, SiteVisitQuery.Count(), "Wrong number of results in query");
                SiteVisit_ado adoSiteVisit = SiteVisitQuery.First();
                validateObjectEquality(toInsert, adoSiteVisit);
            }
        }
Example #25
0
    protected void RetrieveIncomplete_Click(object sender, EventArgs e)
    {
        if (this.SiteVisitedInput.SelectedIndex > -1 && !string.IsNullOrEmpty(this.VisitDateInput.Text))
        {
            List <SiteVisit> visitList = SiteVisitMapper.SelectAllForSite(Guid.Parse(this.SiteVisitedInput.SelectedValue));
            SiteVisit        theVisit  = visitList.Find(x => !x.IsDataEntryComplete
                                                        &&
                                                        x.StartTimeStamp.Value.ToShortDateString()
                                                        .Equals(
                                                            DateTime.Parse(this.VisitDateInput.Text).ToShortDateString()));
            if (theVisit != null)
            {
                resetSession();

                this.UserState.SiteVisit = theVisit;
                this.UserState.SiteVisit.SupplementalObservations.AddRange(
                    SupplementalObservationMapper.SelectAllForEvent(theVisit.Id));
                this.UserState.SiteVisit.PointSurveys.AddRange(PointSurveyMapper.SelectAllForSiteVisit(theVisit.Id));
                this.UserState.SiteVisit.PointSurveys.ForEach(x =>
                {
                    x.Observations.AddRange(ObservationMapper.SelectAllForEvent <PointCountBeyond50>(x.Id));
                    x.Observations.AddRange(ObservationMapper.SelectAllForEvent <PointCountWithin50>(x.Id));
                });
                List <SiteCondition> conditions = ConditionsMapper.Select_BySiteVisitId(theVisit.Id);
                if (conditions != null && conditions.Count.Equals(2))
                {
                    this.UserState.SiteVisit.StartConditions =
                        conditions.Single(x => x.Id.Equals(this.UserState.SiteVisit.StartConditions.Id));
                    this.UserState.SiteVisit.EndConditions =
                        conditions.Single(x => x.Id.Equals(this.UserState.SiteVisit.EndConditions.Id));
                }

                loadCurrentSiteVisit();
            }
            else
            {
                Master.SetErrorMessage(
                    "<p>No <i>incomplete</i> site visit entry has been started for this site and date.</p>");
            }
        }
        else
        {
            Master.SetErrorMessage(
                "<p>Both site and date must be filled in to retrieve an incomplete site visit.</p>");
        }
    }
        public async Task <IActionResult> Post([FromBody] SiteVisit entity)
        {
            try
            {
                entity.ObserverID = this.LoggedInUser().ID;

                if (!isValid(entity))
                {
                    return(new BadRequestResult());                  // This returns HTTP 404
                }
                return(Ok(await agent.Add(entity)));
            }
            catch (Exception ex)
            {
                return(await HandleExceptionAsync(ex));
            }
        }
Example #27
0
        public void t_SiteVisit_Save_Update()
        {
            SiteVisit_ado setupObject = null;

            // backdoor data setup
            DbTestHelper.LoadAdoObjects(delegate(IbaUnitTestEntities iba)
            {
                setupObject = SiteVisit_ado.CreateSiteVisit_ado(TestHelper.TestGuid1, true, TestHelper.TestGuid2,
                                                                DateTime.Now, DateTime.Now.AddHours(2), TestHelper.TestGuid3);
                setupObject.ObserverId = TestHelper.TestGuid4;
                setupObject.RecorderId = TestHelper.TestGuid3;
                setupObject.Comments   = "asdf asdfasdf";
                iba.AddToSiteVisit_ado1(setupObject);
            });
            List <SiteVisit_ado> extraList = DbTestHelper.LoadExtraneousSiteVisits();

            // Setup object to be saved. Change everything except the Id.
            SiteVisit toSave = new SiteVisit()
            {
                Id                  = setupObject.EventId,
                EndTimeStamp        = setupObject.EndTime.AddHours(1),
                IsDataEntryComplete = false,
                LocationId          = TestHelper.TestGuid4,
                ObserverId          = TestHelper.TestGuid3,
                RecorderId          = TestHelper.TestGuid2,
                StartTimeStamp      = setupObject.StartTime.AddHours(0.5),
                Comments            = "asdf asdfa sdf asdfasdfasdf"
            };

            // Execute the test
            SiteVisitMapper.Update(toSave);

            // Validate results
            using (IbaUnitTestEntities iba = new IbaUnitTestEntities())
            {
                var SiteVisitQuery = from SiteVisits in iba.SiteVisit_ado1 select SiteVisits;
                Assert.IsNotNull(SiteVisitQuery, "Query result is null");
                Assert.AreEqual(extraList.Count() + 1, SiteVisitQuery.Count(), "Wrong number of results in query");
                SiteVisit_ado adoSiteVisit = SiteVisitQuery.First(x => x.EventId == TestHelper.TestGuid1);
                validateObjectEquality(toSave, adoSiteVisit);

                validateExtraSiteVisitAdos(extraList, SiteVisitQuery);
            }
        }
        public void t_Load_SiteVisit_Normal()
        {
            DataTable table = new DataTable();

            table.Columns.Add("Id", typeof(Guid));
            table.Columns.Add("EndTime", typeof(DateTime));
            table.Columns.Add("LocationId", typeof(Guid));
            table.Columns.Add("StartTime", typeof(DateTime));
            table.Columns.Add("ObserverId", typeof(Guid));
            table.Columns.Add("RecorderId", typeof(Guid));

            Guid     id         = TestHelper.TestGuid1;
            Guid     locationId = TestHelper.TestGuid2;
            DateTime?start      = DateTime.Now;
            DateTime?end        = DateTime.Now.AddHours(1);
            Guid     observer   = TestHelper.TestGuid3;
            Guid     recorder   = TestHelper.TestGuid4;

            DataRow row = table.NewRow();

            row["Id"]         = id;
            row["EndTime"]    = end;
            row["LocationId"] = locationId;
            row["StartTime"]  = start;
            row["ObserverId"] = observer;
            row["RecorderId"] = recorder;

            table.Rows.Add(row);

            IDataReader reader = table.CreateDataReader();

            Assert.IsTrue(reader.Read(), "Reader failed");

            SiteVisit survey = new SiteVisit();

            EventBaseMapper.Load(reader, survey);

            Assert.IsNotNull(survey, "Survey object is null");
            Assert.AreEqual(id, survey.Id, "Id");
            Assert.AreEqual(locationId, survey.LocationId, "LocationId");
            Assert.AreEqual(start, survey.StartTimeStamp, "StartTimeStamp");
            Assert.AreEqual(end, survey.EndTimeStamp, "EndTimeStamp");
        }
Example #29
0
        public void t_SiteVisit_Select_ByGuid()
        {
            SiteVisit_ado setupObject = null;

            // backdoor data setup
            DbTestHelper.LoadAdoObjects(delegate(IbaUnitTestEntities iba)
            {
                setupObject = SiteVisit_ado.CreateSiteVisit_ado(TestHelper.TestGuid1, true, TestHelper.TestGuid2,
                                                                DateTime.Now, DateTime.Now.AddHours(2), TestHelper.TestGuid3);
                setupObject.ObserverId = TestHelper.TestGuid4;
                setupObject.RecorderId = TestHelper.TestGuid3;
                setupObject.Comments   = "asdf asdfasdf";
                iba.AddToSiteVisit_ado1(setupObject);
            });
            List <SiteVisit_ado> extraList = DbTestHelper.LoadExtraneousSiteVisits();

            // Exercise the test
            SiteVisit resultObject = SiteVisitMapper.Select(setupObject.EventId);

            validateObjectEquality(resultObject, setupObject);
        }
        /// <summary>
        /// Gets the point surveys.
        /// </summary>
        /// <param name="visit">The visit.</param>
        /// <returns></returns>
        public static List <PointSurveyReviewDTO> GetPointSurveys(SiteVisit visit)
        {
            List <PointSurveyReviewDTO> dtoList = new List <PointSurveyReviewDTO>();

            foreach (FiftyMeterPointSurvey survey in visit.PointSurveys)
            {
                foreach (FiftyMeterPointObservation observation in survey.Observations)
                {
                    // TODO: create separate objects for each count
                    PointSurveyReviewDTO dto = new PointSurveyReviewDTO()
                    {
                        AlphaCode = observation.SpeciesCode,
                        //Beyond50 = observation.CountBeyond50.ToString(),
                        Comments = observation.Comments,
                        //Within50 = observation.CountWithin50.ToString()
                    };
                    dto.SamplingPointName = survey.LocationId.ToString();
                    // TODO: fill in Warnings, proper SamplingPointName, and SpeciesName.
                }
            }
            return(dtoList);
        }