Пример #1
0
        private static FiftyMeterPointSurvey Load(IDataReader reader)
        {
            FiftyMeterPointSurvey survey = new FiftyMeterPointSurvey();

            EventBaseMapper.Load(reader, survey);

            survey.NoiseCode   = reader.GetByteFromName("NoiseCode");
            survey.SiteVisitId = reader.GetGuidFromName("SiteVisitId");

            return(survey);
        }
Пример #2
0
        /// <summary>
        /// Saves the specified  <see cref="FiftyMeterPointSurvey"/> object.
        /// </summary>
        /// <param name="survey">The FiftyMeterPointSurvey object to save.</param>
        private static void save(FiftyMeterPointSurvey survey)
        {
            List <QueryParameter> queryList = EventBaseMapper.CreateSaveParameters(survey);

            queryList.AddRange(new List <QueryParameter>()
            {
                new QueryParameter("NoiseCode", survey.NoiseCode),
                new QueryParameter("SiteVisitId", survey.SiteVisitId)
            });
            BaseMapper.SaveObject(survey, queryList, TABLE_NAME);
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
        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);
        }